class_docstr: Feature storage object which should support a fetch() operation.  It is the
  counterpart of a tensor for homogeneous graphs, or a dict of tensor for heterogeneous
  graphs where the keys are node/edge types.
class_docstr_tok: ["Feature","storage","object","which","should","support","a","fetch","(",")","operation",".","It","is","the","counterpart","of","a","tensor","for","homogeneous","graphs",",","or","a","dict","of","tensor","for","heterogeneous","graphs","where","the","keys","are","node\/edge","types","."]
docstr: Retrieve the features at the given indices.
  
  If :attr:`indices` is a tensor, this is equivalent to
  
  .. code::
  
     storage[indices]
  
  If :attr:`indices` is a dict of tensor, this is equivalent to
  
  .. code::
  
     {k: storage[k][indices[k]] for k in indices.keys()}
  
  The subclasses can choose to utilize or ignore the flag :attr:`pin_memory`
  depending on the underlying framework.
docstr_tok: ["Retrieve","the","features","at","the","given","indices",".","If",":","attr",":","`","indices","`","is","a","tensor",",","this","is","equivalent","to","..","code",":",":","storage","[","indices","]","If",":","attr",":","`","indices","`","is","a","dict","of","tensor",",","this","is","equivalent","to","..","code",":",":","{","k",":","storage","[","k","]","[","indices","[","k","]","]","for","k","in","indices.keys","(",")","}","The","subclasses","can","choose","to","utilize","or","ignore","the","flag",":","attr",":","`","pin_memory","`","depending","on","the","underlying","framework","."]
code: def fetch(self, indices, device, pin_memory=False, **kwargs):
      """Retrieve the features at the given indices.
  
      If :attr:`indices` is a tensor, this is equivalent to
  
      .. code::
  
         storage[indices]
  
      If :attr:`indices` is a dict of tensor, this is equivalent to
  
      .. code::
  
         {k: storage[k][indices[k]] for k in indices.keys()}
  
      The subclasses can choose to utilize or ignore the flag :attr:`pin_memory`
      depending on the underlying framework.
      """
      raise NotImplementedError
  
file_path: dgl/python/dgl/storages/base.py
imports: import threading
label_desc: Use image node_id 2 for calling the FeatureStorage obj's underlying member method code with example usage: obj.fetch(indices, device, pin_memory) without return types