code: def map_shape_structure(fn, struct):
      """Variant of tree.map_structure that operates on shape tuples."""
      if is_shape_tuple(struct):
          return fn(tuple(struct))
      if isinstance(struct, list):
          return [map_shape_structure(fn, e) for e in struct]
      if isinstance(struct, tuple):
          return tuple(map_shape_structure(fn, e) for e in struct)
      if isinstance(struct, dict):
          return {
              k: map_shape_structure(fn, v) for k, v in struct.items()
          }
      else:
          raise ValueError(
              f"Cannot map function to unknown object {struct}"
          )
  
label_desc: Use image node_id 2 for calling a global function with example usage: map_shape_structure(fn, struct) and returns: fn, unknown, tuple, unknown