class_docstr: This class abstracts handling of version specifiers.
  
  .. tip::
  
      It is generally not required to instantiate this manually. You should instead
      prefer to work with :class:`SpecifierSet` instead, which can parse
      comma-separated version specifiers (which is what package metadata contains).
docstr: Return whether or not the item is contained in this specifier.
  
  :param item:
      The item to check for, which can be a version string or a
      :class:`Version` instance.
  :param prereleases:
      Whether or not to match prereleases with this Specifier. If set to
      ``None`` (the default), it uses :attr:`prereleases` to determine
      whether or not prereleases are allowed.
  
  >>> Specifier(">=1.2.3").contains("1.2.3")
  True
  >>> Specifier(">=1.2.3").contains(Version("1.2.3"))
  True
  >>> Specifier(">=1.2.3").contains("1.0.0")
  False
  >>> Specifier(">=1.2.3").contains("1.3.0a1")
  False
  >>> Specifier(">=1.2.3", prereleases=True).contains("1.3.0a1")
  True
  >>> Specifier(">=1.2.3").contains("1.3.0a1", prereleases=True)
  True
docstr_tok: ["Return","whether","or","not","the","item","is","contained","in","this","specifier",".",":","param","item",":","The","item","to","check","for",",","which","can","be","a","version","string","or","a",":","class",":","`","Version","`","instance",".",":","param","prereleases",":","Whether","or","not","to","match","prereleases","with","this","Specifier",".","If","set","to","``","None","``","(","the","default",")",",","it","uses",":","attr",":","`","prereleases","`","to","determine","whether","or","not","prereleases","are","allowed",".",">",">",">","Specifier","(","``",">","=1.2.3","''",")",".contains","(","``","1.2.3","''",")","True",">",">",">","Specifier","(","``",">","=1.2.3","''",")",".contains","(","Version","(","``","1.2.3","''",")",")","True",">",">",">","Specifier","(","``",">","=1.2.3","''",")",".contains","(","``","1.0.0","''",")","False",">",">",">","Specifier","(","``",">","=1.2.3","''",")",".contains","(","``","1.3.0a1","''",")","False",">",">",">","Specifier","(","``",">","=1.2.3","''",",","prereleases=True",")",".contains","(","``","1.3.0a1","''",")","True",">",">",">","Specifier","(","``",">","=1.2.3","''",")",".contains","(","``","1.3.0a1","''",",","prereleases=True",")","True"]
code: def contains(
      self, item: UnparsedVersion, prereleases: Optional[bool] = None
  ) -> bool:
      """Return whether or not the item is contained in this specifier.
  
      :param item:
          The item to check for, which can be a version string or a
          :class:`Version` instance.
      :param prereleases:
          Whether or not to match prereleases with this Specifier. If set to
          ``None`` (the default), it uses :attr:`prereleases` to determine
          whether or not prereleases are allowed.
  
      >>> Specifier(">=1.2.3").contains("1.2.3")
      True
      >>> Specifier(">=1.2.3").contains(Version("1.2.3"))
      True
      >>> Specifier(">=1.2.3").contains("1.0.0")
      False
      >>> Specifier(">=1.2.3").contains("1.3.0a1")
      False
      >>> Specifier(">=1.2.3", prereleases=True).contains("1.3.0a1")
      True
      >>> Specifier(">=1.2.3").contains("1.3.0a1", prereleases=True)
      True
      """
  
      # Determine if prereleases are to be allowed or not.
      if prereleases is None:
          prereleases = self.prereleases
  
      # Normalize item to a Version, this allows us to have a shortcut for
      # "2.0" in Specifier(">=2")
      normalized_item = _coerce_version(item)
  
      # Determine if we should be supporting prereleases in this specifier
      # or not, if we do not support prereleases than we can short circuit
      # logic if this version is a prereleases.
      if normalized_item.is_prerelease and not prereleases:
          return False
  
      # Actually do the comparison to determine if this item is contained
      # within this Specifier or not.
      operator_callable: CallableOperator = self._get_operator(
          self.operator
      )
      return operator_callable(normalized_item, self.version)
  
imports: import abc
  import itertools
  import re
  from typing import Callable, Iterable, Iterator, List, Optional, Set, Tuple, TypeVar, Union
  from .utils import canonicalize_version
  from .version import Version
label_desc: Use image node_id 21 for calling the Specifier obj's underlying member method code with example usage: obj.contains(item, prereleases) and returns: operator_callable, False