code: def check_specifier(dist, attr, value):
      
      try:
          packaging.specifiers.SpecifierSet(value)
      except packaging.specifiers.InvalidSpecifier as error:
          tmpl = (
              "{attr!r} must be a string "
              "containing valid version specifiers; {error}"
          )
          raise DistutilsSetupError(tmpl.format(attr=attr, error=error))
docs: Verify that value is a valid version specifier