code: def id_fn(
      x: Union[np.ndarray, torch.Tensor, list]
  ) -> Union[np.ndarray, torch.Tensor]:
      if isinstance(x, list):
          return torch.from_numpy(np.concatenate(x, axis=0))
      else:
          return x
  
file_path: alibi-detect/alibi_detect/utils/pytorch/tests/test_prediction_pt.py
imports: import numpy
  import pytest
  import torch
  import torch.nn
  from typing import Tuple, Union
  from alibi_detect.utils.pytorch import predict_batch
label_desc: Use image node_id 1 for calling a global function with example usage: id_fn(x) and returns: torch, x