<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def document(self, *document_path):
 """Get a reference to a document in a collection. For a top-level document: .. code-block:: python For a document in a sub-collection: .. code-block:: python Documents in sub-collections can be nested deeper in a similar fashion. Args: * A single ``/``-delimited path to a document * A tuple of document path segments Returns: ~.firestore_v1beta1.document.DocumentReference: A reference to a document in a collection. """

        if len(document_path) == 1:
            path = document_path[0].split(_helpers.DOCUMENT_PATH_DELIMITER)
        else:
            path = document_path

        return DocumentReference(*path, client=self)