docstr: Remove version restrictions unless they are strict.
  
  >>> _RequirementWithComment("arrow<=1.2.2,>=1.2.0", comment="# anything").adjust(False)
  'arrow<=1.2.2,>=1.2.0'
  >>> _RequirementWithComment("arrow<=1.2.2,>=1.2.0", comment="# strict").adjust(False)
  'arrow<=1.2.2,>=1.2.0  # strict'
  >>> _RequirementWithComment("arrow<=1.2.2,>=1.2.0", comment="# my name").adjust(True)
  'arrow>=1.2.0'
  >>> _RequirementWithComment("arrow>=1.2.0, <=1.2.2", comment="# strict").adjust(True)
  'arrow<=1.2.2,>=1.2.0  # strict'
  >>> _RequirementWithComment("arrow").adjust(True)
  'arrow'
docstr_tok: ["Remove","version","restrictions","unless","they","are","strict",".",">",">",">","_RequirementWithComment","(","``","arrow","<","=1.2.2",",",">","=1.2.0","''",",","comment=","''","#","anything","''",")",".adjust","(","False",")","'arrow","<","=1.2.2",",",">","=1.2.0'",">",">",">","_RequirementWithComment","(","``","arrow","<","=1.2.2",",",">","=1.2.0","''",",","comment=","''","#","strict","''",")",".adjust","(","False",")","'arrow","<","=1.2.2",",",">","=1.2.0","#","strict'",">",">",">","_RequirementWithComment","(","``","arrow","<","=1.2.2",",",">","=1.2.0","''",",","comment=","''","#","my","name","''",")",".adjust","(","True",")","'arrow",">","=1.2.0'",">",">",">","_RequirementWithComment","(","``","arrow",">","=1.2.0",",","<","=1.2.2","''",",","comment=","''","#","strict","''",")",".adjust","(","True",")","'arrow","<","=1.2.2",",",">","=1.2.0","#","strict'",">",">",">","_RequirementWithComment","(","``","arrow","''",")",".adjust","(","True",")","'arrow","'"]
code: def adjust(self, unfreeze: bool) -> str:
      """Remove version restrictions unless they are strict.
  
      >>> _RequirementWithComment("arrow<=1.2.2,>=1.2.0", comment="# anything").adjust(False)
      'arrow<=1.2.2,>=1.2.0'
      >>> _RequirementWithComment("arrow<=1.2.2,>=1.2.0", comment="# strict").adjust(False)
      'arrow<=1.2.2,>=1.2.0  # strict'
      >>> _RequirementWithComment("arrow<=1.2.2,>=1.2.0", comment="# my name").adjust(True)
      'arrow>=1.2.0'
      >>> _RequirementWithComment("arrow>=1.2.0, <=1.2.2", comment="# strict").adjust(True)
      'arrow<=1.2.2,>=1.2.0  # strict'
      >>> _RequirementWithComment("arrow").adjust(True)
      'arrow'
  
      """
      out = str(self)
      if self.strict:
          return f"{out}  {self.strict_string}"
      if unfreeze:
          for operator, version in self.specs:
              if operator in ("<", "<="):
                  # drop upper bound
                  return out.replace(f"{operator}{version},", "")
      return out
  
file_path: torchmetrics/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 pathlib import Path
  from typing import Any, Iterable, Iterator, List, Optional, Tuple, Union
  from pkg_resources import Requirement, yield_lines
  from setuptools import find_packages, setup
label_desc: Use image node_id 2 for calling the _RequirementWithComment obj's underlying member method code with example usage: obj.adjust(unfreeze) and returns: out, out, str, self, out