code: def parse_reqs(fpath):
      pkg_v_re = re.compile(
          r"^(?P<pkg>[^><==]+)[><==]{,2}(?P<version>.*)$"
      )
      """Parse requirements file."""
      reqs = dict()
      with open(fpath, "r") as f:
          for line in f:
              if line.startswith("#"):
                  continue
              m = pkg_v_re.match(line.strip())
              if m:
                  d = m.groupdict()
                  reqs[d["pkg"].strip()] = d["version"].strip()
      return reqs
  
file_path: clearml/clearml/utilities/pigar/utils.py
imports: from __future__ import print_function, division, absolute_import
  import os
  import re
  import sys
  import difflib
label_desc: Use image node_id 1 for calling a global function with example usage: parse_reqs(fpath) and returns: reqs