code: def flatten(value):
      """Flattens any nesting of tuples, lists, or dicts, with numpy arrays or
      scalars inside. Returns 1D numpy array and an unflatten function.
      Doesn't preserve mixed numeric types (e.g. floats and ints). Assumes dict
      keys are sortable."""
      unflatten, flat_value = make_vjp(_flatten)(value)
      return flat_value, unflatten
  
imports: from autograd import make_vjp
  from autograd.builtins import type
  import autograd.numpy
label_desc: Use image node_id 1 for calling a global function with example usage: flatten(value) and returns: flat_value,  unflatten