code: def pip_needed_packages(packages, python="python"):
      pipp = subprocess.Popen(
          [python, "-m", "pip", "freeze"],
          stdout=subprocess.PIPE,
          stderr=subprocess.STDOUT,
      )
  
      pipout, _ = pipp.communicate()
      pipout = pipout.decode("utf-8")
      current_packages = {l.strip() for l in pipout.strip().split("\n")}
  
      # current_packages = {p._key + '==' + p._version for p in
      #                    pip.pip.get_installed_distributions(local_only=True)}
  
      return {p for p in packages} - current_packages
  
imports: import os
  import sys
  import subprocess
  import argparse
  import json
  import psutil
  import time
  import six
  import signal
  import pdb
  from apscheduler.schedulers.background import BackgroundScheduler
  from studio import fs_tracker, model
  from studio.util import logs
  from studio.queues.local_queue import LocalQueue
  from studio.util.gpu_util import get_available_gpus, get_gpu_mapping, get_gpus_summary
  from studio.artifacts.artifact import Artifact
  from studio.experiments.experiment import Experiment
  from studio.util.util import sixdecode, str2duration, retry, parse_verbosity, check_for_kb_interrupt
label_desc: Use image node_id 9 for calling a global function with example usage: pip_needed_packages(packages, python) and returns: unknown