code: def expand_requirements_links(requirements: list) -> list:
      """Expand requirements that contain links to other requirement files"""
      to_add = []
      to_remove = []
  
      for requirement in requirements:
          if requirement.startswith("-r "):
              if os.path.exists(requirement.split()[1]):
                  with open(requirement.split()[1]) as fh:
                      to_add += expand_requirements_links(
                          [
                              req.strip()
                              for req in fh.read().splitlines()
                          ]
                      )
              to_remove.append(requirement)
  
      for req in to_remove:
          requirements.remove(req)
      for req in to_add:
          requirements.append(req)
  
      return list(set(requirements))
  
imports: import os
  import glob
  from setuptools import find_packages, setup
label_desc: Use image node_id 1 for calling a global function with example usage: expand_requirements_links(requirements) and returns: list