code: def _augment_requirement(
      ln: str, comment_char: str = "#", unfreeze: bool = True
  ) -> str:
      """Adjust the upper version contrains.
  
      >>> _augment_requirement("arrow<=1.2.2,>=1.2.0  # anything", unfreeze=False)
      'arrow<=1.2.2,>=1.2.0'
      >>> _augment_requirement("arrow<=1.2.2,>=1.2.0  # strict", unfreeze=False)
      'arrow<=1.2.2,>=1.2.0  # strict'
      >>> _augment_requirement("arrow<=1.2.2,>=1.2.0  # my name", unfreeze=True)
      'arrow>=1.2.0'
      >>> _augment_requirement("arrow>=1.2.0, <=1.2.2  # strict", unfreeze=True)
      'arrow>=1.2.0, <=1.2.2  # strict'
      >>> _augment_requirement("arrow", unfreeze=True)
      'arrow'
  
      """
      # filer all comments
      if comment_char in ln:
          comment = ln[ln.index(comment_char) :]
          ln = ln[: ln.index(comment_char)]
          is_strict = "strict" in comment
      else:
          is_strict = False
      req = ln.strip()
      # skip directly installed dependencies
      if not req or (
          unfreeze and any(c in req for c in ["http:", "https:", "@"])
      ):
          return ""
  
      # remove version restrictions unless they are strict
      if unfreeze and "<" in req and not is_strict:
          req = re.sub(r",? *<=? *[\d\.\*]+,? *", "", req).strip()
  
      # adding strict back to the comment
      if is_strict:
          req += "  # strict"
  
      return req
  
file_path: lightning-flash/setup.py
imports: import glob
  import os
  import re
  from functools import partial
  from importlib.util import module_from_spec, spec_from_file_location
  from itertools import chain
  from setuptools import find_packages, setup
label_desc: Use image node_id 2 for calling a global function with example usage: _augment_requirement(ln, comment_char, unfreeze) and returns: req, str