code: def _check_ver(pyver, op, wanted):
      '''
      >>> _check_ver('2.7.15', 'gt', '2.7')
      True
      >>> _check_ver('2.7.15', 'gt', '2.7.15')
      False
      >>> _check_ver('2.7.15', 'ge', '2.7.15')
      True
      >>> _check_ver('2.7.15', 'eq', '2.7.15')
      True
      '''
      pyver = distutils.version.LooseVersion(pyver)
      wanted = distutils.version.LooseVersion(wanted)
      return getattr(operator, '__{}__'.format(op))(pyver, wantedf _check_ver(pyver, op, wanted):
      '''
      >>> _check_ver('2.7.15', 'gt', '2.7')
      True
      >>> _check_ver('2.7.15', 'gt', '2.7.15')
      False
      >>> _check_ver('2.7.15', 'ge', '2.7.15')
      True
      >>> _check_ver('2.7.15', 'eq', '2.7.15')
      True
      '''
      pyver = distutils.version.LooseVersion(pyver)
      wanted = distutils.version.LooseVersion(wanted)
      return getattr(operator, '__{}__'.format(op))(pyver, wanted)
docs: >>> _check_ver('2.7.15', 'gt', '2.7')
      True
      >>> _check_ver('2.7.15', 'gt', '2.7.15')
      False
      >>> _check_ver('2.7.15', 'ge', '2.7.15')
      True
      >>> _check_ver('2.7.15', 'eq', '2.7.15')
      True