code: def extract_dependencies(pipe_def=None, pipe_generator=None):
      
      if pipe_def:
          pydeps = gen_dependencies(pipe_def)
      elif pipe_generator:
          pydeps = pipe_generator(Context(describe_dependencies=True))
      else:
          raise Exception('Must supply at least one kwarg!')
  
      return sorted(set(pydeps))
docs: Extract modules used by a pipe