code: function createKey(self, id, ancestors, namespace) {
      const hasAncestors = typeof ancestors !== 'undefined' && ancestors !== null && is.array(ancestors);
  
      /*
      /* Create copy of ancestors to avoid mutating the Array
      */
      if (hasAncestors) {
          ancestors = ancestors.slice();
      }
  
      let path;
      if (id) {
          id = parseId(self, id);
          path = hasAncestors ? ancestors.concat([self.entityKind, id]) : [self.entityKind, id];
      } else {
          if (hasAncestors) {
              ancestors.push(self.entityKind);
          }
          path = hasAncestors ? ancestors : self.entityKind;
      }
  
      if (namespace && !is.array(path)) {
          path = [path];
      }
      return namespace ? self.gstore.ds.key({ namespace, path }) : self.gstore.ds.key(path);
  }
docs: Private -------