code: def add_packages(packages):
      """Add external packages to the pyspark interpreter.
  
      Set the PYSPARK_SUBMIT_ARGS properly.
  
      Parameters
      ----------
      packages: list of package names in string format
      """
  
      # if the parameter is a string, convert to a single element list
      if isinstance(packages, str):
          packages = [packages]
  
      _add_to_submit_args("--packages " + ",".join(packages))
  
file_path: findspark/findspark.py
imports: from glob import glob
  import os
  import sys
label_desc: Use image node_id 6 for calling a global function with example usage: add_packages(packages) without return types