code: def _install_requirements(requirements):
      
      import importlib
      import pip
  
      pip.main(["install", "-r", requirements])
      # Some shenanigans to be sure everything is importable after this, especially .egg-link files which
      # are referenced in *.pth files and apparently loaded by site.py at some magic bootstrap moment of the
      # python interpreter.
      pip.utils.pkg_resources = importlib.reload(pip.utils.pkg_resources)
      import site
  
      importlib.reload(site)
docs: Install requirements given a path to requirements.txt file.