class_docstr: A data iterator object to contain a static heterogeneous graph with a dynamically
  changing constant time difference temporal feature set (multiple signals).
  The node labels (target) are also temporal. The iterator returns a single
  constant time difference temporal snapshot for a time period (e.g. day or week).
  This single temporal snapshot is a Pytorch Geometric HeteroData object. Between two
  temporal snapshots the features and optionally passed attributes might change.
  However, the underlying graph is the same.
  
   .. code-block:: python
      from torch_geometric_temporal.signal import StaticHeteroGraphTemporalSignal
  
      edge_index_dict = {
          ("author", "writes", "paper"): np.array([[0, 0, 1], [0, 1, 2]])
      }
  
      feature_dicts = [
          {"author": np.array([[0], [0]]),
           "paper": np.array([[0], [0], [0]])},
          {"author": np.array([[0.1], [0.1]]),
           "paper": np.array([[0.1], [0.1], [0.1]])},
          {"author": np.array([[0.2], [0.2]]),
           "paper": np.array([[0.2], [0.2], [0.2]])}
      ]
  
      target_dicts = [
          {"author": np.array([0, 0]),
           "paper": np.array([0, 0, 0])},
          {"author": np.array([1, 1]),
           "paper": np.array([1, 1, 1])},
          {"author": np.array([2, 2]),
           "paper": np.array([2, 2, 2])}
      ]
  
      # Create heterogeneous graph snapshots with same structure but different features
      # and labels (in this example node types "paper" and "author"):
      graph_snapshots = StaticHeteroGraphTemporalSignal(edge_index_dict, None, feature_dicts, target_dicts)
  
  Note that in this example all feature and target dicts have the same keys.
  
  * To skip initializing nodes of all types in a specific snapshot simply
    pass :obj:`None` instead of a dictionary:
  
  .. code-block:: python
      feature_dicts = [
          {"author": np.array([[0], [0]]),
           "paper": np.array([[0], [0], [0]])},
          None,
          {"author": np.array([[0.2], [0.2]]),
           "paper": np.array([[0.2], [0.2], [0.2]])}
      ]
  
  * To skip initializing node features of type :obj:`"paper"` in a specific snapshot simply
    pass :obj:`None` as dictionary value or omit this feature type:
  
  .. code-block:: python
      feature_dicts = [
          {"author": np.array([[0], [0]]),
           "paper": np.array([[0], [0], [0]])},
          {"author": np.array([[0.1], [0.1]]),
           "paper": None}, # pass None as value
          {"author": np.array([[0.2], [0.2]])} # omit type in dict
      ]
  
  Args:
      edge_index_dict (Dictionary of keys=Tuples and values=Numpy arrays): Relation type tuples
       and their edge index tensors.
      edge_weight_dict (Dictionary of keys=Tuples and values=Numpy arrays): Relation type tuples
       and their edge weight tensors.
      feature_dicts (Sequence of dictionaries where keys=Strings and values=Numpy arrays): Sequence of node
       types and their feature tensors.
      target_dicts (Sequence of dictionaries where keys=Strings and values=Numpy arrays): Sequence of node
       types and their label (target) tensors.
      **kwargs (optional Sequence of dictionaries where keys=Strings and values=Numpy arrays): Sequence
       of node types and their additional attributes.
class_docstr_tok: ["A","data","iterator","object","to","contain","a","static","heterogeneous","graph","with","a","dynamically","changing","constant","time","difference","temporal","feature","set","(","multiple","signals",")",".","The","node","labels","(","target",")","are","also","temporal",".","The","iterator","returns","a","single","constant","time","difference","temporal","snapshot","for","a","time","period","(","e.g",".","day","or","week",")",".","This","single","temporal","snapshot","is","a","Pytorch","Geometric","HeteroData","object",".","Between","two","temporal","snapshots","the","features","and","optionally","passed","attributes","might","change",".","However",",","the","underlying","graph","is","the","same",".","..","code-block",":",":","python","from","torch_geometric_temporal.signal","import","StaticHeteroGraphTemporalSignal","edge_index_dict","=","{","(","``","author","''",",","``","writes","''",",","``","paper","''",")",":","np.array","(","[","[","0",",","0",",","1","]",",","[","0",",","1",",","2","]","]",")","}","feature_dicts","=","[","{","``","author","''",":","np.array","(","[","[","0","]",",","[","0","]","]",")",",","``","paper","''",":","np.array","(","[","[","0","]",",","[","0","]",",","[","0","]","]",")","}",",","{","``","author","''",":","np.array","(","[","[","0.1","]",",","[","0.1","]","]",")",",","``","paper","''",":","np.array","(","[","[","0.1","]",",","[","0.1","]",",","[","0.1","]","]",")","}",",","{","``","author","''",":","np.array","(","[","[","0.2","]",",","[","0.2","]","]",")",",","``","paper","''",":","np.array","(","[","[","0.2","]",",","[","0.2","]",",","[","0.2","]","]",")","}","]","target_dicts","=","[","{","``","author","''",":","np.array","(","[","0",",","0","]",")",",","``","paper","''",":","np.array","(","[","0",",","0",",","0","]",")","}",",","{","``","author","''",":","np.array","(","[","1",",","1","]",")",",","``","paper","''",":","np.array","(","[","1",",","1",",","1","]",")","}",",","{","``","author","''",":","np.array","(","[","2",",","2","]",")",",","``","paper","''",":","np.array","(","[","2",",","2",",","2","]",")","}","]","#","Create","heterogeneous","graph","snapshots","with","same","structure","but","different","features","#","and","labels","(","in","this","example","node","types","``","paper","''","and","``","author","''",")",":","graph_snapshots","=","StaticHeteroGraphTemporalSignal","(","edge_index_dict",",","None",",","feature_dicts",",","target_dicts",")","Note","that","in","this","example","all","feature","and","target","dicts","have","the","same","keys",".","*","To","skip","initializing","nodes","of","all","types","in","a","specific","snapshot","simply","pass",":","obj",":","`","None","`","instead","of","a","dictionary",":","..","code-block",":",":","python","feature_dicts","=","[","{","``","author","''",":","np.array","(","[","[","0","]",",","[","0","]","]",")",",","``","paper","''",":","np.array","(","[","[","0","]",",","[","0","]",",","[","0","]","]",")","}",",","None",",","{","``","author","''",":","np.array","(","[","[","0.2","]",",","[","0.2","]","]",")",",","``","paper","''",":","np.array","(","[","[","0.2","]",",","[","0.2","]",",","[","0.2","]","]",")","}","]","*","To","skip","initializing","node","features","of","type",":","obj",":","`","``","paper","''","`","in","a","specific","snapshot","simply","pass",":","obj",":","`","None","`","as","dictionary","value","or","omit","this","feature","type",":","..","code-block",":",":","python","feature_dicts","=","[","{","``","author","''",":","np.array","(","[","[","0","]",",","[","0","]","]",")",",","``","paper","''",":","np.array","(","[","[","0","]",",","[","0","]",",","[","0","]","]",")","}",",","{","``","author","''",":","np.array","(","[","[","0.1","]",",","[","0.1","]","]",")",",","``","paper","''",":","None","}",",","#","pass","None","as","value","{","``","author","''",":","np.array","(","[","[","0.2","]",",","[","0.2","]","]",")","}","#","omit","type","in","dict","]","Args",":","edge_index_dict","(","Dictionary","of","keys=Tuples","and","values=Numpy","arrays",")",":","Relation","type","tuples","and","their","edge","index","tensors",".","edge_weight_dict","(","Dictionary","of","keys=Tuples","and","values=Numpy","arrays",")",":","Relation","type","tuples","and","their","edge","weight","tensors",".","feature_dicts","(","Sequence","of","dictionaries","where","keys=Strings","and","values=Numpy","arrays",")",":","Sequence","of","node","types","and","their","feature","tensors",".","target_dicts","(","Sequence","of","dictionaries","where","keys=Strings","and","values=Numpy","arrays",")",":","Sequence","of","node","types","and","their","label","(","target",")","tensors",".","*","*","kwargs","(","optional","Sequence","of","dictionaries","where","keys=Strings","and","values=Numpy","arrays",")",":","Sequence","of","node","types","and","their","additional","attributes","."]
code: def _get_edge_index(self):
      if self.edge_index_dict is None:
          return self.edge_index_dict
      else:
          return {
              key: torch.LongTensor(value)
              for key, value in self.edge_index_dict.items()
          }
  
file_path: pytorch_geometric_temporal/torch_geometric_temporal/signal/static_hetero_graph_temporal_signal.py
imports: import torch
  import numpy
  from typing import Sequence, Dict, Union, Tuple
  from torch_geometric.data import HeteroData
label_desc: Use image node_id 4 for calling the StaticHeteroGraphTemporalSignal obj's underlying member method code with example usage: obj._get_edge_index() and returns: self, unknown