code: def _check_data(
      original: Union[Data, HeteroData],
      padded: Union[Data, HeteroData],
      max_num_nodes: Union[int, Dict[NodeType, int]],
      max_num_edges: Optional[Union[int, Dict[EdgeType, int]]] = None,
      node_pad_value: Optional[Union[Padding, int, float]] = None,
      edge_pad_value: Optional[Union[Padding, int, float]] = None,
      is_mask_available: bool = False,
      exclude_keys: Optional[List[str]] = None,
  ):
      if (
          not isinstance(node_pad_value, Padding)
          and node_pad_value is not None
      ):
          node_pad_value = UniformPadding(node_pad_value)
      if (
          not isinstance(edge_pad_value, Padding)
          and edge_pad_value is not None
      ):
          edge_pad_value = UniformPadding(edge_pad_value)
  
      if is_mask_available is None:
          is_mask_available = False
  
      if exclude_keys is None:
          exclude_keys = []
  
      if isinstance(original, Data):
          _check_homo_data_nodes(
              original,
              padded,
              max_num_nodes,
              node_pad_value,
              is_mask_available,
              exclude_keys,
          )
          _check_homo_data_edges(
              original,
              padded,
              max_num_edges,
              edge_pad_value,
              is_mask_available,
              exclude_keys,
          )
      else:
          _check_hetero_data_nodes(
              original,
              padded,
              max_num_nodes,
              node_pad_value,
              is_mask_available,
              exclude_keys,
          )
          _check_hetero_data_edges(
              original,
              padded,
              max_num_edges,
              edge_pad_value,
              is_mask_available,
              exclude_keys,
          )
  
imports: import numbers
  from typing import Dict, Generator, List, Optional, Tuple, Union
  import pytest
  import torch
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.datasets import FakeDataset, FakeHeteroDataset
  from torch_geometric.transforms import Pad
  from torch_geometric.transforms.pad import AttrNamePadding, EdgeTypePadding, NodeTypePadding, Padding, UniformPadding
  from torch_geometric.typing import EdgeType, NodeType
label_desc: Use image node_id 11 for calling a global function with example usage: _check_data(original, padded, max_num_nodes, max_num_edges, node_pad_value, edge_pad_value, is_mask_available, exclude_keys) without return types