code: def add_packages(packages):
      
  
      #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)  +" pyspark-shell")
docs: Add external packages to the pyspark interpreter.
  
      Set the PYSPARK_SUBMIT_ARGS properly.
  
      Parameters
      ----------
      packages: list of package names in string format