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)
Creates a parent key for the current path.
dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/datastore/key.py/Key._make_parent