def optimize(self, path: str) -> None:
    'Optimize the specified path.\n\n        Raises\n        ------\n        InterfaceError\n            if the client does not connect to a database\n\n        Notes\n        -----\n        The "remote" repo can live in the local database.\n\n        Parameters\n        ----------\n        path : string\n            Path to optimize, for instance admin/database/_meta for the repo graph.\n\n        Examples\n        --------\n        >>> client = WOQLClient("https://127.0.0.1:6363/")\n        >>> client.optimize(\'admin/database\') # optimise database branch (here main)\n        >>> client.optimize(\'admin/database/_meta\') # optimise the repository graph (actually creates a squashed flat layer)\n        >>> client.optimize(\'admin/database/local/_commits\') # commit graph is optimised\n        '
    self._check_connection()
    _finish_response(requests.post(self._optimize_url(path), headers={'user-agent': f'terminusdb-client-python/{__version__}'}, auth=self._auth()))
Optimize the specified path.

Raises
------
InterfaceError
    if the client does not connect to a database

Notes
-----
The "remote" repo can live in the local database.

Parameters
----------
path : string
    Path to optimize, for instance admin/database/_meta for the repo graph.

Examples
--------
>>> client = WOQLClient("https://127.0.0.1:6363/")
>>> client.optimize('admin/database') # optimise database branch (here main)
>>> client.optimize('admin/database/_meta') # optimise the repository graph (actually creates a squashed flat layer)
>>> client.optimize('admin/database/local/_commits') # commit graph is optimised
def optimize(self, path: str) -> None:
    'Optimize the specified path.\n\n        Raises\n        ------\n        InterfaceError\n            if the client does not connect to a database\n\n        Notes\n        -----\n        The "remote" repo can live in the local database.\n\n        Parameters\n        ----------\n        path : string\n            Path to optimize, for instance admin/database/_meta for the repo graph.\n\n        Examples\n        --------\n        >>> client = WOQLClient("https://127.0.0.1:6363/")\n        >>> client.optimize(\'admin/database\') # optimise database branch (here main)\n        >>> client.optimize(\'admin/database/_meta\') # optimise the repository graph (actually creates a squashed flat layer)\n        >>> client.optimize(\'admin/database/local/_commits\') # commit graph is optimised\n        '
    self._check_connection()
    _finish_response(requests.post(self._optimize_url(path), headers={'user-agent': f'terminusdb-client-python/{__version__}'}, auth=self._auth()))