code: def parse_requirements():
      _install_requires = []
      _dependency_links = []
      with open(
          "./requirements.txt", encoding="utf-8"
      ) as requirements_file:
          lines = [r.strip() for r in requirements_file.readlines()]
          for line in lines:
              is_extras = (
                  "flash-attn" in line
                  or "flash-attention" in line
                  or "deepspeed" in line
                  or "mamba-ssm" in line
              )
              if line.startswith("--extra-index-url"):
                  # Handle custom index URLs
                  _, url = line.split()
                  _dependency_links.append(url)
              elif not is_extras and line and line[0] != "#":
                  # Handle standard packages
                  _install_requires.append(line)
  
      try:
          torch_version = version("torch")
          if torch_version.startswith("2.1.1"):
              _install_requires.pop(
                  _install_requires.index("xformers==0.0.22")
              )
              _install_requires.append("xformers==0.0.23")
      except PackageNotFoundError:
          pass
  
      return _install_requires, _dependency_links
  
label_desc: Use image node_id 1 for calling a global function with example usage: parse_requirements() and returns: _install_requires,  _dependency_links