code: def nested_iter(node: Union[Mapping, Sequence]) -> Iterable:
      if isinstance(node, Mapping):
          for key, value in node.items():
              for inner_key, inner_value in nested_iter(value):
                  yield inner_key, inner_value
      elif isinstance(node, Sequence):
          for i, inner_value in enumerate(node):
              yield i, inner_value
      else:
          yield None, node
  
imports: import copy
  import os.path
  import warnings
  from abc import ABC
  from typing import Any, Callable, Dict, Iterable, List, Mapping, MutableSequence, Optional, Sequence, Tuple, Type, Union
  import torch
  from torch import Tensor
  from tqdm import tqdm
  import torch_geometric
  from torch_geometric.data import Batch, Data
  from torch_geometric.data.collate import collate
  from torch_geometric.data.data import BaseData
  from torch_geometric.data.dataset import Dataset, IndexType
  from torch_geometric.data.separate import separate
  from torch_geometric.io import fs
label_desc: Use image node_id 1 for calling a global function with example usage: nested_iter(node) without return types