def _CheckRequirements(requirements_file_path):
  with open(requirements_file_path, 'rb') as fp:
    requirements_to_check = [(requirements_file_path, deque(fp.readlines()))]
  try:
    while requirements_to_check:
      file_path, lines = requirements_to_check.pop()
      while lines:
        line = lines.popleft().strip()
        if line.startswith('-r'):
          requirements_to_check.append((file_path, lines))
          file_path = os.path.join(os.path.dirname(file_path), line[2:])
          with open(file_path, 'rb') as fp:
            lines = deque(fp.readlines())
        elif line:
          pkg_resources.require(line)
  except (pkg_resources.DistributionNotFound,
          pkg_resources.VersionConflict) as e:
    # In newer versions of setuptools, these exception classes have a report
    # method that provides a readable description of the error.
    report = getattr(e, 'report', None)
    err_msg = report() if report else str(e)
    raise errors.Setup.PythonPackageRequirementUnfulfilled(
        'A Python package requirement was not met while checking "{path}": '
        '{msg}{linesep}To install required packages, execute the following '
        'command:{linesep}pip install -r "{path}"{linesep}To bypass package '
        'requirement checks, run PerfKit Benchmarker with the '
        '--ignore_package_requirements flag.'.format(
            linesep=os.linesep, msg=err_msg, path=requirements_file_path))
compLength less than origLength.
dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/requirements.py/_CheckRequirements--crossover with--dataset/ETHPy150Open typesupply/woffTools/Lib/woffTools/test/test_validate.py/directoryCompressedLengthTest1