code: def get_requirements_section(
      launch_project: LaunchProject, builder_type: str
  ) -> str:
      if builder_type == "docker":
          buildx_installed = docker.is_buildx_installed()
          if not buildx_installed:
              wandb.termwarn(
                  "Docker BuildX is not installed, for faster builds upgrade docker: https://github.com/docker/buildx#installing"
              )
              prefix = "RUN WANDB_DISABLE_CACHE=true"
      elif builder_type == "kaniko":
          prefix = "RUN WANDB_DISABLE_CACHE=true"
          buildx_installed = False
      if launch_project.deps_type == "pip":
          requirements_files = []
          if launch_project.project_dir is not None and os.path.exists(
              os.path.join(
                  launch_project.project_dir, "requirements.txt"
              )
          ):
              requirements_files += ["src/requirements.txt"]
              pip_install_line = "pip install -r requirements.txt"
          elif (
              launch_project.project_dir is not None
              and os.path.exists(
                  os.path.join(
                      launch_project.project_dir,
                      "requirements.frozen.txt",
                  )
              )
          ):
              # if we have frozen requirements stored, copy those over and have them take precedence
              requirements_files += [
                  "src/requirements.frozen.txt",
                  "_wandb_bootstrap.py",
              ]
              pip_install_line = (
                  _parse_existing_requirements(launch_project)
                  + "python _wandb_bootstrap.py"
              )
          if buildx_installed:
              prefix = "RUN --mount=type=cache,mode=0777,target=/root/.cache/pip"
  
          requirements_line = PIP_TEMPLATE.format(
              buildx_optional_prefix=prefix,
              requirements_files=" ".join(requirements_files),
              pip_install=pip_install_line,
          )
      elif launch_project.deps_type == "conda":
          if buildx_installed:
              prefix = "RUN --mount=type=cache,mode=0777,target=/opt/conda/pkgs"
          requirements_line = CONDA_TEMPLATE.format(
              buildx_optional_prefix=prefix
          )
      else:
          # this means no deps file was found
          requirements_line = (
              "RUN mkdir -p env/"  # Docker fails otherwise
          )
          wandb.termwarn(
              "No requirements file found. No packages will be installed."
          )
  
      return requirements_line
  
imports: import hashlib
  import json
  import logging
  import os
  import shlex
  import shutil
  import sys
  import tempfile
  from typing import Any, Dict, List, Optional, Tuple
  import pkg_resources
  import yaml
  from dockerpycreds.utils import find_executable
  from six.moves import shlex_quote
  import wandb
  import wandb.docker
  import wandb.env
  from wandb.apis.internal import Api
  from wandb.sdk.launch.loader import builder_from_config, environment_from_config, registry_from_config
  from .._project_spec import EntryPoint, EntrypointDefaults, LaunchProject, fetch_and_validate_project
  from ..errors import ExecutionError, LaunchError
  from ..registry.abstract import AbstractRegistry
  from ..utils import AZURE_CONTAINER_REGISTRY_URI_REGEX, ELASTIC_CONTAINER_REGISTRY_URI_REGEX, GCP_ARTIFACT_REGISTRY_URI_REGEX, LAUNCH_CONFIG_FILE, LOG_PREFIX, event_loop_thread_exec, resolve_build_and_registry_config
label_desc: Use image node_id 6 for calling a global function with example usage: get_requirements_section(launch_project, builder_type) and returns: requirements_line