code: 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
docs: Given an iterable of lines from a Metadata file, return
      the value of the Version field, if present, or None otherwise.