code: def wrap_transform(transform, fn, transform_type=None):
      if (transform_type is None) or isinstance(
          transform, transform_type
      ):
          return fn(transform)
      elif isinstance(transform, Compose):
          return Compose(
              [
                  wrap_transform(subtransform, fn, transform_type)
                  for subtransform in transform.transforms
              ]
          )
      else:
          return transform
  
label_desc: Use image node_id 2 for calling a global function with example usage: wrap_transform(transform, fn, transform_type) and returns: fn, Compose, transform