parameters: (value)
return_statement: return (version_info, None)
docstring: Convert a version string like "3", "37", or "3.7.3" into a tuple of ints.
  
      :return: A 2-tuple (version_info, error_msg), where `error_msg` is
          non-None if and only if there was a parsing error.
docstring_summary: Convert a version string like "3", "37", or "3.7.3" into a tuple of ints.
docstring_tokens: Convert a version string like 3 37 or 3 . 7 . 3 into a tuple of ints .
function: def _convert_python_version(value):
      # type: (str) -> Tuple[Tuple[int, ...], Optional[str]]
      """
      Convert a version string like "3", "37", or "3.7.3" into a tuple of ints.
  
      :return: A 2-tuple (version_info, error_msg), where `error_msg` is
          non-None if and only if there was a parsing error.
      """
      if not value:
          # The empty string is the same as not providing a value.
          return (None, None)
  
      parts = value.split('.')
      if len(parts) > 3:
          return ((), 'at most three version parts are allowed')
  
      if len(parts) == 1:
          # Then we are in the case of "3" or "37".
          value = parts[0]
          if len(value) > 1:
              parts = [value[0], value[1:]]
  
      try:
          version_info = tuple(int(part) for part in parts)
      except ValueError:
          return ((), 'each version part must be an integer')
  
      return (version_info, None)
function_tokens: def _convert_python_version ( value ) : # type: (str) -> Tuple[Tuple[int, ...], Optional[str]] if not value : # The empty string is the same as not providing a value. return ( None , None ) parts = value . split ( '.' ) if len ( parts ) > 3 : return ( ( ) , 'at most three version parts are allowed' ) if len ( parts ) == 1 : # Then we are in the case of "3" or "37". value = parts [ 0 ] if len ( value ) > 1 : parts = [ value [ 0 ] , value [ 1 : ] ] try : version_info = tuple ( int ( part ) for part in parts ) except ValueError : return ( ( ) , 'each version part must be an integer' ) return ( version_info , None )