code: def extract_input(pipe_def=None, pipe_generator=None):
      
      if pipe_def:
          pyinput = gen_input(pipe_def)
      elif pipe_generator:
          pyinput = pipe_generator(Context(describe_input=True))
      else:
          raise Exception('Must supply at least one kwarg!')
  
      return sorted(list(pyinput))
docs: Extract inputs required by a pipe