Document that owns the current collection.

        Returns:
            Optional[~.firestore_v1beta1.document.DocumentReference]: The
            parent document, if the current collection is not a
            top-level collection.

def parent(self):
        """Document that owns the current collection.

        Returns:
            Optional[~.firestore_v1beta1.document.DocumentReference]: The
            parent document, if the current collection is not a
            top-level collection.
        """
        if len(self._path) == 1:
            return None
        else:
            parent_path = self._path[:-1]
        return self._client.document(*parent_path)