code: def get_requirements(req_file="requirements.txt"):
      req_tmp_file = req_file + ".tmp.txt"
      try:
          reqs_http = []
  
          with open(req_file, "rt") as f:
              contents = f.readlines()
              with open(req_tmp_file, "wt") as g:
                  for line in contents:
                      if (
                          "http://" not in line
                          and "https://" not in line
                      ):
                          g.write(line)
                      else:
                          reqs_http.append(line.replace("\n", ""))
          reqs_http = [x for x in reqs_http if x]
          print("reqs_http: %s" % reqs_http, flush=True)
  
          with open(req_tmp_file, "rt") as f:
              requirements = pkg_resources.parse_requirements(f.read())
      finally:
          remove(req_tmp_file)
      return requirements, reqs_http
  
file_path: h2ogpt/tests/test_requirements.py
imports: import pkg_resources
  from pkg_resources import DistributionNotFound, VersionConflict
  from src.utils import remove
  from tests.utils import wrap_test_forked
  import requests
  import json
label_desc: Use image node_id 2 for calling a global function with example usage: get_requirements(req_file) and returns: requirements,  reqs_http