code: def get_current_package(
      line: str, deps: List[str], current_pkg: Optional[str]
  ) -> Optional[str]:
      """Tries to pull a package name from the line.
  
      Used to keep track of what the currently-installing package is,
      in case an error message isn't on the same line as the package
      """
      # "Collecting my-package==1.0.0"
      if line.startswith("Collecting"):
          return line.split(" ")[1]
      # "Building wheel for my-package (pyproject.toml): finished with status 'error'"
      elif line.strip().startswith(
          "Building wheel"
      ) and line.strip().endswith("finished with status 'error'"):
          return add_version_to_package_name(
              deps, line.strip().split(" ")[3]
          )
      # "Running setup.py install for my-package: finished with status 'error'"
      elif line.strip().startswith(
          "Running setup.py install"
      ) and line.strip().endswith("finished with status 'error'"):
          return add_version_to_package_name(
              deps, line.strip().split(" ")[4][:-1]
          )
      return current_pkg
  
file_path: wandb/wandb/sdk/launch/builder/templates/_wandb_bootstrap.py
imports: import json
  import os
  import re
  import subprocess
  import sys
  from typing import List, Optional, Set
label_desc: Use image node_id 4 for calling a global function with example usage: get_current_package(line, deps, current_pkg) and returns: current_pkg, line, add_version_to_package_name, add_version_to_package_name