code: def __extract_edge_indexes_and_weights(
      self, data
  ) -> _typing.Union[
      _typing.Sequence[
          _typing.Tuple[
              torch.LongTensor, _typing.Optional[torch.Tensor]
          ]
      ],
      _typing.Tuple[torch.LongTensor, _typing.Optional[torch.Tensor]],
  ]:
      def __compose_edge_index_and_weight(
          _edge_index: torch.LongTensor,
          _edge_weight: _typing.Optional[torch.Tensor] = None,
      ) -> _typing.Tuple[
          torch.LongTensor, _typing.Optional[torch.Tensor]
      ]:
          if (
              type(_edge_index) != torch.Tensor
              or _edge_index.dtype != torch.int64
          ):
              print(type(_edge_index))
              raise TypeError
          if _edge_weight is not None and (
              type(_edge_weight) != torch.Tensor
              or _edge_index.size() != (2, _edge_weight.size(0))
          ):
              _edge_weight: _typing.Optional[torch.Tensor] = None
          return _edge_index, _edge_weight
  
      if not (
          hasattr(data, "edge_indexes")
          and isinstance(
              getattr(data, "edge_indexes"), _typing.Sequence
          )
          and len(getattr(data, "edge_indexes"))
          == len(self.__sequential_encoding_layers)
      ):
          return __compose_edge_index_and_weight(
              getattr(data, "edge_index"),
              getattr(data, "edge_weight", None),
          )
      for __edge_index in getattr(data, "edge_indexes"):
          if (
              type(__edge_index) != torch.Tensor
              or __edge_index.dtype != torch.int64
          ):
              return __compose_edge_index_and_weight(
                  getattr(data, "edge_index"),
                  getattr(data, "edge_weight", None),
              )
  
      if (
          hasattr(data, "edge_weights")
          and isinstance(
              getattr(data, "edge_weights"), _typing.Sequence
          )
          and len(getattr(data, "edge_weights"))
          == len(self.__sequential_encoding_layers)
      ):
          return [
              __compose_edge_index_and_weight(_edge_index, _edge_weight)
              for _edge_index, _edge_weight in zip(
                  getattr(data, "edge_indexes"),
                  getattr(data, "edge_weights"),
              )
          ]
      else:
          return [
              __compose_edge_index_and_weight(__edge_index)
              for __edge_index in getattr(data, "edge_indexes")
          ]
  
imports: import torch
  import torch.nn.functional
  import typing
  from torch_geometric.nn.conv import GCNConv
  import autogl.data
  from .None import register_model
  from .base import BaseAutoModel, activate_func, ClassificationSupportedSequentialModel
  from ....utils import get_logger
label_desc: Use image node_id 3 for calling the GCN obj's underlying member method code with example usage: obj.__extract_edge_indexes_and_weights(data) and returns: _edge_index,  _edge_weight, __compose_edge_index_and_weight, unknown, unknown, __compose_edge_index_and_weight