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

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

        return CollectionReference(*path, client=self)