def compose ( * parameter_functions ) : def composed_fn ( var_name , variable , phase ) : for fn in parameter_functions : variable = fn ( var_name , variable , phase ) return variable return composed_fn
how to get a function in python to apply to a changes number of variables
Composes multiple modification functions in order .
def compose(*parameter_functions):
  """Composes multiple modification functions in order.

  Args:
    *parameter_functions: The functions to compose.

  Returns:
    A parameter modification function that consists of applying all the provided
    functions.
  """
  def composed_fn(var_name, variable, phase):
    for fn in parameter_functions:
      variable = fn(var_name, variable, phase)
    return variable
  return composed_fn