docstr: Parse the possible input types.
  If the x and edge_index are in args, follow the args.
  In other case, find them in kwargs.
docstr_tok: ["Parse","the","possible","input","types",".","If","the","x","and","edge_index","are","in","args",",","follow","the","args",".","In","other","case",",","find","them","in","kwargs","."]
code: def _argsparse(self, *args, **kwargs):
      r"""Parse the possible input types.
      If the x and edge_index are in args, follow the args.
      In other case, find them in kwargs.
      """
      if args:
          if len(args) == 1:
              data = args[0]
              x = data.x
              edge_index = data.edge_index
              if hasattr(data, "batch"):
                  batch = data.batch
              else:
                  batch = torch.zeros(
                      x.shape[0], dtype=torch.int64, device=x.device
                  )
  
          elif len(args) == 2:
              x, edge_index = args[0], args[1]
              batch = torch.zeros(
                  x.shape[0], dtype=torch.int64, device=x.device
              )
  
          elif len(args) == 3:
              x, edge_index, batch = args[0], args[1], args[2]
  
          else:
              raise ValueError(
                  f"forward's args should take 1, 2 or 3 arguments but got {len(args)}"
              )
      else:
          data: Batch = kwargs.get("data")
          if not data:
              x = kwargs.get("x")
              edge_index = kwargs.get("edge_index")
              assert (
                  x is not None
              ), "forward's args is empty and required node features x is not in kwargs"
              assert (
                  edge_index is not None
              ), "forward's args is empty and required edge_index is not in kwargs"
              batch = kwargs.get("batch")
              if not batch:
                  batch = torch.zeros(
                      x.shape[0], dtype=torch.int64, device=x.device
                  )
          else:
              x = data.x
              edge_index = data.edge_index
              if hasattr(data, "batch"):
                  batch = data.batch
              else:
                  batch = torch.zeros(
                      x.shape[0], dtype=torch.int64, device=x.device
                  )
      return x, edge_index, batch
  
imports: import torch
  import torch.nn
  from functools import partial
  from typing import Union, List
  import torch.nn.functional
  from torch_geometric.data import Batch
  from torch_geometric.nn.conv.gcn_conv import gcn_norm
  from torch_geometric.nn.conv import GCNConv
  from torch_geometric.nn.glob import global_mean_pool, global_add_pool, global_max_pool
  from torch import Tensor
  from torch_sparse import SparseTensor, fill_diag
  from torch_geometric.typing import Adj, OptTensor, Size
  from torch_geometric.utils import add_self_loops
  from dig.xgraph.models import GNNPool
  from collections import OrderedDict
label_desc: Use image node_id 2 for calling the GNNBase obj's underlying member method code with example usage: obj._argsparse() and returns: x,  edge_index,  batch