code: def install_deps(pkgs, path_to_json, base="/opt/fw/"):
      for fw in pkgs:
          fw, ver = fw.split("/")
          path = base + fw + "/" + ver
          # check to see if this pkg has specific version dependencies
          with open(path_to_json, "r") as file:
              json_data = json.load(file)
              for keys in json_data[fw]:
                  # check if key is dict
                  if isinstance(keys, dict):
                      # this is a dep with just one key
                      # being the dep
                      dep = list(keys.keys())[0]
                      # check if version is there in this
                      if ver in keys[dep].keys():
                          subprocess.run(
                              "pip3 install --upgrade"
                              f" {dep}=={keys[dep][ver]} --target"
                              f" {path} --default-timeout=100 --upgrade  --no-cache-dir",
                              shell=True,
                          )
                      else:
                          subprocess.run(
                              f"pip3 install  {dep} --target"
                              f" {path} --default-timeout=100   --no-cache-dir",
                              shell=True,
                          )
                  else:
                      subprocess.run(
                          "pip3 install "
                          f" {keys} {f'-f https://data.pyg.org/whl/torch-{ver}%2Bcpu.html' if keys=='torch-scatter' else ''} --target"
                          f" {path} --default-timeout=100   --no-cache-dir",
                          shell=True,
                      )
  
imports: import os
  import subprocess
  import sys
  import json
label_desc: Use image node_id 3 for calling a global function with example usage: install_deps(pkgs, path_to_json, base) without return types