parameters: (lines)
return_statement: return safe_version(value.strip()) or None
docstring: Given an iterable of lines from a Metadata file, return
      the value of the Version field, if present, or None otherwise.
docstring_summary: Given an iterable of lines from a Metadata file, return
      the value of the Version field, if present, or None otherwise.
docstring_tokens: Given an iterable of lines from a Metadata file return the value of the Version field if present or None otherwise .
function: def _version_from_file(lines):
      """
      Given an iterable of lines from a Metadata file, return
      the value of the Version field, if present, or None otherwise.
      """
      def is_version_line(line):
          return line.lower().startswith('version:')
      version_lines = filter(is_version_line, lines)
      line = next(iter(version_lines), '')
      _, _, value = line.partition(':')
      return safe_version(value.strip()) or None
function_tokens: def _version_from_file ( lines ) : def is_version_line ( line ) : return line . lower ( ) . startswith ( 'version:' ) version_lines = filter ( is_version_line , lines ) line = next ( iter ( version_lines ) , '' ) _ , _ , value = line . partition ( ':' ) return safe_version ( value . strip ( ) ) or None