code: def indices_complete_check(
      loader: List[
          Tuple[Union[Tensor, np.ndarray], Union[Tensor, np.ndarray]]
      ],
      output_indices: Union[Tensor, np.ndarray],
  ):
      if isinstance(output_indices, Tensor):
          output_indices = output_indices.cpu().numpy()
  
      outs = []
      for out, aux in loader:
          if isinstance(out, Tensor):
              out = out.cpu().numpy()
          if isinstance(aux, Tensor):
              aux = aux.cpu().numpy()
  
          assert np.all(
              np.in1d(out, aux)
          ), "Not all output nodes are in aux nodes!"
          outs.append(out)
  
      outs = np.sort(np.concatenate(outs))
      assert np.all(
          outs == np.sort(output_indices)
      ), "Output nodes missing or duplicate!"
  
imports: import logging
  import math
  from typing import Callable, Iterator, List, NamedTuple, Optional, Tuple, Union
  import numpy
  import scipy.sparse
  import torch
  from torch import Tensor
  from tqdm import tqdm
  from torch_geometric.data import Data
  from torch_geometric.typing import SparseTensor
  from torch_geometric.utils import get_ppr, is_undirected, subgraph
label_desc: Use image node_id 3 for calling a global function with example usage: indices_complete_check(loader, output_indices) without return types