class_docstr: A prerequisite to building or installing a distribution
class_docstr_tok: ["A","prerequisite","to","building","or","installing","a","distribution"]
docstr: Get version number of installed module, 'None', or 'default'
  
  Search 'paths' for module.  If not found, return 'None'.  If found,
  return the extracted version attribute, or 'default' if no version
  attribute was specified, or the value cannot be determined without
  importing the module.  The version is formatted according to the
  requirement's version format (if any), unless it is 'None' or the
  supplied 'default'.
docstr_tok: ["Get","version","number","of","installed","module",",","'None","'",",","or","'default'","Search","'paths","'","for","module",".","If","not","found",",","return","'None","'",".","If","found",",","return","the","extracted","version","attribute",",","or","'default","'","if","no","version","attribute","was","specified",",","or","the","value","can","not","be","determined","without","importing","the","module",".","The","version","is","formatted","according","to","the","requirement","'s","version","format","(","if","any",")",",","unless","it","is","'None","'","or","the","supplied","'default","'","."]
code: def get_version(self, paths=None, default="unknown"):
      """Get version number of installed module, 'None', or 'default'
  
      Search 'paths' for module.  If not found, return 'None'.  If found,
      return the extracted version attribute, or 'default' if no version
      attribute was specified, or the value cannot be determined without
      importing the module.  The version is formatted according to the
      requirement's version format (if any), unless it is 'None' or the
      supplied 'default'.
      """
  
      if self.attribute is None:
          try:
              f, p, i = find_module(self.module, paths)
              if f:
                  f.close()
              return default
          except ImportError:
              return None
  
      v = get_module_constant(
          self.module, self.attribute, default, paths
      )
  
      if v is not None and v is not default and self.format is not None:
          return self.format(v)
  
      return v
  
file_path: catboost/contrib/python/setuptools/py2/setuptools/depends.py
imports: import sys
  import marshal
  import contextlib
  from distutils.version import StrictVersion
  from .py33compat import Bytecode
  from .py27compat import find_module, PY_COMPILED, PY_FROZEN, PY_SOURCE
  from .None import py27compat
label_desc: Use image node_id 4 for calling the Require obj's underlying member method code with example usage: obj.get_version(paths, default) and returns: v, self, default, None