code: def postprocess(
      data: HeteroData,
      edge_types: List[EdgeType],
      drop_orig_edge_types: bool,
      keep_same_node_type: bool,
      drop_unconnected_node_types: bool,
  ) -> None:
      if drop_orig_edge_types:
          for i in edge_types:
              if keep_same_node_type and i[0] == i[-1]:
                  continue
              else:
                  del data[i]
  
      # Remove nodes not connected by any edge type:
      if drop_unconnected_node_types:
          new_edge_types = data.edge_types
          node_types = data.node_types
          connected_nodes = set()
          for i in new_edge_types:
              connected_nodes.add(i[0])
              connected_nodes.add(i[-1])
          for node in node_types:
              if node not in connected_nodes:
                  del data[node]
  
imports: import warnings
  from typing import List, Optional, Tuple, Union, cast
  import torch
  from torch import Tensor
  from torch_geometric import EdgeIndex
  from torch_geometric.data import HeteroData
  from torch_geometric.data.datapipes import functional_transform
  from torch_geometric.transforms import BaseTransform
  from torch_geometric.typing import EdgeType
  from torch_geometric.utils import coalesce, degree
label_desc: Use image node_id 1 for calling a global function with example usage: postprocess(data, edge_types, drop_orig_edge_types, keep_same_node_type, drop_unconnected_node_types) without return types