code: def __package_dependencies(dist_dir, additional_reqs, silent):
      
      logging.info('Packaging dependencies')
      libs_dir = os.path.join(dist_dir, 'libs')
      if not os.path.isdir(libs_dir):
          os.mkdir(libs_dir)
  
      # Get requirements
      req_txt = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'requirements-submit.txt')
      with open(req_txt, 'r') as req:
          requirements = req.read().splitlines()
      if additional_reqs:
          with open(additional_reqs, 'r') as req:
              for row in req:
                  requirements.append(row)
  
      # Remove duplicates
      requirements = list(set(requirements))
  
      # Install
      devnull = open(os.devnull, 'w')
      outp = {'stderr': STDOUT, 'stdout': devnull} if silent else {}
      for pkg in requirements:
          cmd = ['pip', 'install', pkg, '-t', libs_dir]
          logging.debug('Calling `%s`', str(cmd))
          call(cmd, **outp)
      devnull.close()
  
      # Package
      shutil.make_archive(libs_dir, 'zip', libs_dir, './')
docs: Installs the app's dependencies from pip and packages them (as zip), to be submitted to spark.
  
      Parameters
      ----------
      dist_dir (str): Path to directory where the packaged libs shall be located
      additional_reqs (str): Path to a requirements.txt, containing any of the app's additional
          requirements
      silent (bool): Flag indicating whether pip output should be printed to console