def create_branch(self, new_branch_id: str, empty: bool=False) -> None:
    'Create a branch starting from the current branch.\n\n        Parameters\n        ----------\n        new_branch_id : str\n            New branch identifier.\n        empty : bool\n            Create an empty branch if true (no starting commit)\n\n        Raises\n        ------\n        InterfaceError\n            if the client does not connect to a database\n        '
    self._check_connection()
    if empty:
        source = {}
    elif self.ref:
        source = {'origin': f'{self.team}/{self.db}/{self.repo}/commit/{self.ref}'}
    else:
        source = {'origin': f'{self.team}/{self.db}/{self.repo}/branch/{self.branch}'}
    _finish_response(requests.post(self._branch_url(new_branch_id), headers={'user-agent': f'terminusdb-client-python/{__version__}'}, json=source, auth=self._auth()))
Create a branch starting from the current branch.

Parameters
----------
new_branch_id : str
    New branch identifier.
empty : bool
    Create an empty branch if true (no starting commit)

Raises
------
InterfaceError
    if the client does not connect to a database
def create_branch(self, new_branch_id: str, empty: bool=False) -> None:
    'Create a branch starting from the current branch.\n\n        Parameters\n        ----------\n        new_branch_id : str\n            New branch identifier.\n        empty : bool\n            Create an empty branch if true (no starting commit)\n\n        Raises\n        ------\n        InterfaceError\n            if the client does not connect to a database\n        '
    self._check_connection()
    if empty:
        source = {}
    elif self.ref:
        source = {'origin': f'{self.team}/{self.db}/{self.repo}/commit/{self.ref}'}
    else:
        source = {'origin': f'{self.team}/{self.db}/{self.repo}/branch/{self.branch}'}
    _finish_response(requests.post(self._branch_url(new_branch_id), headers={'user-agent': f'terminusdb-client-python/{__version__}'}, json=source, auth=self._auth()))