code: def map_on_tensor(fn, val):
      """Map a function on a Tensor or a list of Tensors"""
      if isinstance(val, Sequence):
          return [map_on_tensor(fn, v) for v in val]
      elif isinstance(val, (dict, MutableMapping)):
          return {k: map_on_tensor(fn, v) for k, v in val.items()}
      return fn(val)
  
label_desc: Use image node_id 1 for calling a global function with example usage: map_on_tensor(fn, val) and returns: fn, unknown, unknown