code: def _make_parent(self):
          
          if self.is_partial:
              parent_args = self.flat_path[:-1]
          else:
              parent_args = self.flat_path[:-2]
          if parent_args:
              return self.__class__(
                  *parent_args, project=self.project, namespace=self.namespace
              )
docs: Creates a parent key for the current path.
  
          Extracts all but the last element in the key path and creates a new
          key, while still matching the namespace and the project.
  
          :rtype: :class:`google.cloud.datastore.key.Key` or :class:`NoneType`
          :returns: A new ``Key`` instance, whose path consists of all but the
                    last element of current path. If the current key has only
                    one path element, returns ``None``.