code: def proportion(func, *args, **kwargs):
      # Get proportion parameter, look in kwargs and args
      arg_map = map_parameters_in_fn_call(args, kwargs, func)
      proportion = arg_map.get("proportion")
  
      # Validate proportion, but only if has a value
      if (not (0 <= proportion <= 1.0)) and proportion is not None:
          raise ValueError("Proportion must be between 0 and 1.0")
      return func(*args, **kwargs)
  
label_desc: Use image node_id 2 for calling a global function with example usage: proportion(func) and returns: func