code: def add_dependencies(fname):
      with open(fname, "r") as f:
          for line in f:
              stripped = line.strip()
              if stripped.startswith("#") or len(stripped) == 0:
                  continue
              if stripped.startswith("-c"):
                  continue
              if stripped.startswith("-r"):
                  additional_requirements = stripped[
                      len("-r") :
                  ].strip()
                  add_dependencies(additional_requirements)
                  continue
              pkg = stripped
              if pkg.startswith("pyspark") and os.path.exists(
                  "../env/SPARK_VERSION"
              ):
                  with open("../env/SPARK_VERSION", "r") as file:
                      spark_version = file.read()
                  [major, minor, patch] = spark_version.split(".")
                  dependencies.append(
                      f"pyspark>={major}.{minor},<{int(major)+1}"
                  )
              else:
                  dependencies.append(pkg)
  
label_desc: Use image node_id 1 for calling a global function with example usage: add_dependencies(fname) without return types