class_docstr: A data object describing a hypergraph.
  
  The data object can hold node-level, link-level and graph-level attributes.
  This object differs from a standard :obj:`~torch_geometric.data.Data`
  object by having hyperedges, i.e. edges that connect more
  than two nodes. For example, in the hypergraph scenario
  :math:`\mathcal{G} = (\mathcal{V}, \mathcal{E})` with
  :math:`\mathcal{V} = \{ 0, 1, 2, 3, 4 \}` and
  :math:`\mathcal{E} = \{ \{ 0, 1, 2 \}, \{ 1, 2, 3, 4 \} \}`, the
  hyperedge index :obj:`edge_index` is represented as:
  
  .. code-block:: python
  
      # hyper graph with two hyperedges
      # connecting 3 and 4 nodes, respectively
      edge_index = torch.tensor([
          [0, 1, 2, 1, 2, 3, 4],
          [0, 0, 0, 1, 1, 1, 1],
      ])
  
  Args:
      x (torch.Tensor, optional): Node feature matrix with shape
          :obj:`[num_nodes, num_node_features]`. (default: :obj:`None`)
      edge_index (LongTensor, optional): Hyperedge tensor
          with shape :obj:`[2, num_edges*num_nodes_per_edge]`.
          Where `edge_index[1]` denotes the hyperedge index and
          `edge_index[0]` denotes the node indicies that are connected
          by the hyperedge. (default: :obj:`None`)
          (default: :obj:`None`)
      edge_attr (torch.Tensor, optional): Edge feature matrix with shape
          :obj:`[num_edges, num_edge_features]`.
          (default: :obj:`None`)
      y (torch.Tensor, optional): Graph-level or node-level ground-truth
          labels with arbitrary shape. (default: :obj:`None`)
      pos (torch.Tensor, optional): Node position matrix with shape
          :obj:`[num_nodes, num_dimensions]`. (default: :obj:`None`)
      **kwargs (optional): Additional attributes.
class_docstr_tok: ["A","data","object","describing","a","hypergraph",".","The","data","object","can","hold","node-level",",","link-level","and","graph-level","attributes",".","This","object","differs","from","a","standard",":","obj",":","`","~torch_geometric.data.Data","`","object","by","having","hyperedges",",","i.e",".","edges","that","connect","more","than","two","nodes",".","For","example",",","in","the","hypergraph","scenario",":","math",":","`","\\mathcal","{","G","}","=","(","\\mathcal","{","V","}",",","\\mathcal","{","E","}",")","`","with",":","math",":","`","\\mathcal","{","V","}","=","\\","{","0",",","1",",","2",",","3",",","4","\\","}","`","and",":","math",":","`","\\mathcal","{","E","}","=","\\","{","\\","{","0",",","1",",","2","\\","}",",","\\","{","1",",","2",",","3",",","4","\\","}","\\","}","`",",","the","hyperedge","index",":","obj",":","`","edge_index","`","is","represented","as",":","..","code-block",":",":","python","#","hyper","graph","with","two","hyperedges","#","connecting","3","and","4","nodes",",","respectively","edge_index","=","torch.tensor","(","[","[","0",",","1",",","2",",","1",",","2",",","3",",","4","]",",","[","0",",","0",",","0",",","1",",","1",",","1",",","1","]",",","]",")","Args",":","x","(","torch.Tensor",",","optional",")",":","Node","feature","matrix","with","shape",":","obj",":","`","[","num_nodes",",","num_node_features","]","`",".","(","default",":",":","obj",":","`","None","`",")","edge_index","(","LongTensor",",","optional",")",":","Hyperedge","tensor","with","shape",":","obj",":","`","[","2",",","num_edges","*","num_nodes_per_edge","]","`",".","Where","`","edge_index","[","1","]","`","denotes","the","hyperedge","index","and","`","edge_index","[","0","]","`","denotes","the","node","indicies","that","are","connected","by","the","hyperedge",".","(","default",":",":","obj",":","`","None","`",")","(","default",":",":","obj",":","`","None","`",")","edge_attr","(","torch.Tensor",",","optional",")",":","Edge","feature","matrix","with","shape",":","obj",":","`","[","num_edges",",","num_edge_features","]","`",".","(","default",":",":","obj",":","`","None","`",")","y","(","torch.Tensor",",","optional",")",":","Graph-level","or","node-level","ground-truth","labels","with","arbitrary","shape",".","(","default",":",":","obj",":","`","None","`",")","pos","(","torch.Tensor",",","optional",")",":","Node","position","matrix","with","shape",":","obj",":","`","[","num_nodes",",","num_dimensions","]","`",".","(","default",":",":","obj",":","`","None","`",")","*","*","kwargs","(","optional",")",":","Additional","attributes","."]
code: def to_heterogeneous(
      self,
      node_type: Optional[Tensor] = None,
      edge_type: Optional[Tensor] = None,
      node_type_names: Optional[List[NodeType]] = None,
      edge_type_names: Optional[List[EdgeType]] = None,
  ) -> HeteroData:
      raise NotImplementedError
  
imports: import copy
  import warnings
  from typing import Any, List, Optional
  import torch
  from torch import Tensor
  from typing_extensions import Self
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.typing import EdgeType, NodeType, OptTensor
  from torch_geometric.utils import select
  from torch_geometric.utils._subgraph import hyper_subgraph
label_desc: Use image node_id 9 for calling the HyperGraphData obj's underlying member method code with example usage: obj.to_heterogeneous(node_type, edge_type, node_type_names, edge_type_names) without return types