def delete_document(self, document: Union[(str, list, dict, Iterable)], graph_type: str='instance', commit_msg: Optional[str]=None, last_data_version: Optional[str]=None) -> None:
    'Delete the specified document(s)\n\n        Parameters\n        ----------\n        document: str or list of str\n            Document(s) (as dictionary or DocumentTemplate objects) or id(s) of document(s) to be updated.\n        graph_type : str\n            Graph type, either "instance" or "schema".\n        commit_msg : str\n            Commit message.\n        last_data_version : str\n            Last version before the update, used to check if the document has been changed unknowingly\n\n        Raises\n        ------\n        InterfaceError\n            if the client does not connect to a database\n        '
    self._validate_graph_type(graph_type)
    self._check_connection()
    doc_id = []
    if ((not isinstance(document, (str, list, dict))) and hasattr(document, '__iter__')):
        document = list(document)
    if (not isinstance(document, list)):
        document = [document]
    for doc in document:
        if hasattr(doc, '_obj_to_dict'):
            doc = doc._obj_to_dict()
        if (isinstance(doc, dict) and doc.get('@id')):
            doc_id.append(doc.get('@id'))
        elif isinstance(doc, str):
            doc_id.append(doc)
    params = self._generate_commit(commit_msg)
    params['graph_type'] = graph_type
    headers = {'user-agent': f'terminusdb-client-python/{__version__}'}
    if (last_data_version is not None):
        headers['TerminusDB-Data-Version'] = last_data_version
    _finish_response(requests.delete(self._documents_url(), headers=headers, params=params, json=doc_id, auth=self._auth()))
Delete the specified document(s)

Parameters
----------
document: str or list of str
    Document(s) (as dictionary or DocumentTemplate objects) or id(s) of document(s) to be updated.
graph_type : str
    Graph type, either "instance" or "schema".
commit_msg : str
    Commit message.
last_data_version : str
    Last version before the update, used to check if the document has been changed unknowingly

Raises
------
InterfaceError
    if the client does not connect to a database
def delete_document(self, document: Union[(str, list, dict, Iterable)], graph_type: str='instance', commit_msg: Optional[str]=None, last_data_version: Optional[str]=None) -> None:
    'Delete the specified document(s)\n\n        Parameters\n        ----------\n        document: str or list of str\n            Document(s) (as dictionary or DocumentTemplate objects) or id(s) of document(s) to be updated.\n        graph_type : str\n            Graph type, either "instance" or "schema".\n        commit_msg : str\n            Commit message.\n        last_data_version : str\n            Last version before the update, used to check if the document has been changed unknowingly\n\n        Raises\n        ------\n        InterfaceError\n            if the client does not connect to a database\n        '
    self._validate_graph_type(graph_type)
    self._check_connection()
    doc_id = []
    if ((not isinstance(document, (str, list, dict))) and hasattr(document, '__iter__')):
        document = list(document)
    if (not isinstance(document, list)):
        document = [document]
    for doc in document:
        if hasattr(doc, '_obj_to_dict'):
            doc = doc._obj_to_dict()
        if (isinstance(doc, dict) and doc.get('@id')):
            doc_id.append(doc.get('@id'))
        elif isinstance(doc, str):
            doc_id.append(doc)
    params = self._generate_commit(commit_msg)
    params['graph_type'] = graph_type
    headers = {'user-agent': f'terminusdb-client-python/{__version__}'}
    if (last_data_version is not None):
        headers['TerminusDB-Data-Version'] = last_data_version
    _finish_response(requests.delete(self._documents_url(), headers=headers, params=params, json=doc_id, auth=self._auth()))