Returns or Creates a Vertex mapped by key.

    Args:
      key: A string reference for a vertex.  May refer to a new Vertex in which
      case it will be created.

    Returns:
      A the Vertex mapped to by key.
173118
def get_vertex(self, key):
    
    if key in self.vertex_map:
      return self.vertex_map[key]
    vertex = self.new_vertex()
    self.vertex_map[key] = vertex
    return vertex
634770
def __prefix_key(self, key):
        
        # If there isn't a prefix don't bother
        if self.prefix is None:
            return key

        # Don't prefix key if it already has it
        if key.startswith(self.prefix + "-"):
            return key

        return "{0}-{1}".format(self.prefix, key)
794066
private String generateKey(String key,
      HashMap<String, String[]>[] queryVariables) {
    StringBuilder newKey = new StringBuilder(key);
    newKey.append(" -");
    for (int q = 0; q < queryVariables.length; q++) {
      if (queryVariables[q] != null && queryVariables[q].size() > 0) {
        for (String name : queryVariables[q].keySet()) {
          newKey.append(" q" + q + ":$" + name + "=");
          if (queryVariables[q].get(name) != null
              && queryVariables[q].get(name).length == 1) {
            newKey.append("'" + queryVariables[q].get(name)[0]
                .replace("\\", "\\\\").replace(",", "\\,") + "'");
          } else {
            newKey.append("-");
          }
        }
      }
    }
    return newKey.toString();
  }
759714
def get(self, key):
        
        if key not in self:
            self[key] = set(get_descendants(self._target_graph, key))
        return self[key]
180425
def _convert_key(self, key, is_setter=False):
        

        # allow arbitrary setting
        if is_setter:
            return list(key)

        for ax, i in zip(self.obj.axes, key):
            if ax.is_integer():
                if not is_integer(i):
                    raise ValueError("At based indexing on an integer index "
                                     "can only have integer indexers")
            else:
                if is_integer(i) and not ax.holds_integer():
                    raise ValueError("At based indexing on an non-integer "
                                     "index can only have non-integer "
                                     "indexers")
        return key
263972
def from_key(key):
    
    model = get_model_from_key(key)
    if model is None:
        raise BadKeyError
    try:
        _, id = key.split(':', 2)
        id = int(id)
    except ValueError, TypeError:
        raise BadKeyError
    return model.objects.get_by_id(id)
449320
def get(self, key) -> str:
        
        # TODO: get is creating files when a key is given which is more than
        # the store size
        chunk_no, offset = self._get_key_location(key)
        with self._openChunk(chunk_no) as chunk:
            return chunk.get(str(offset))
385472
def copy(self, key=None):
        
        other = self.__class__(
            self.__iter__(),
            self.maxlen,
            redis=self.redis,
            key=key,
            writeback=self.writeback,
        )

        return other
74637
def key(self, *args, **kwargs):
        
        if not args and not kwargs:
            return self.class_path
        try:
            if args and not kwargs:
                return "%s:%s" % (self.class_path, self.hash(args))
            # The line might break if your passed values are un-hashable.  If
            # it does, you need to override this method and implement your own
            # key algorithm.
            return "%s:%s:%s:%s" % (self.class_path,
                                    self.hash(args),
                                    self.hash([k for k in sorted(kwargs)]),
                                    self.hash([kwargs[k] for k in sorted(kwargs)]))
        except TypeError:
            raise RuntimeError(
                "Unable to generate cache key due to unhashable"
                "args or kwargs - you need to implement your own"
                "key generation method to avoid this problem")
679317
@Override
    public <T> VertexProperty<T> property(String key) {
        T value = value(key);
        if (value == null) {
            return VertexProperty.<T>empty();
        } else {
            return new BitsyVertexProperty<T>(this, key, value);
        }
    }
907724
def get(self, key):

    

    try:
      try:
        obj = self.bucket.get(key)
      except:
        raise

      return dict(obj or {})

    except:
      raise
195429
async def create(cls, key: str):
        
        return cls._object(await cls._handler.create(key=key))
241458
private static String getInnerMapKey(final String key) {
        final int index = key.indexOf(".");
        return key.substring(index + 1);
    }
646181
public static ModelMetrics getFromDKV(Key key) {
    if (null == key)
      throw new IllegalArgumentException("Got null key.");

    Value v = DKV.get(key);
    if (null == v)
      throw new IllegalArgumentException("Did not find key: " + key.toString());

    Iced ice = v.get();
    if (! (ice instanceof ModelMetrics))
      throw new IllegalArgumentException("Expected a Model for key: " + key.toString() + "; got a: " + ice.getClass());

    return (ModelMetrics)ice;
  }
371642
def get_index(self, key):
        
        try:
            return self[self.index_lookup.get(key)]

        except TypeError:
            raise KeyError
620107
def load_key(self, key):
        
        self._serialize(key)
        if isinstance(key, ec.EllipticCurvePrivateKey):
            self.priv_key = key
            self.pub_key = key.public_key()
        else:
            self.pub_key = key

        return self
655376
function getMappedKey (key, create) {
        allKeyMap = getAllKeys();

        if (create && !(key in allKeyMap)) {
            var newKey = ("uD" + _UNIQUE_ID++);
            setMappedKey(newKey, key);

            return newKey;
        } else {
            return allKeyMap[key];
        }
    }