code: def apply_tuple_or_single(fn, val):
      if isinstance(val, tuple):
          return tuple(map(fn, val))
      return fn(val)
  
file_path: vit-pytorch/vit_pytorch/extractor.py
imports: import torch
  from torch import nn
label_desc: Use image node_id 4 for calling a global function with example usage: apply_tuple_or_single(fn, val) and returns: fn, tuple