nodes: 0, module; 1, function_definition; 2, function_name:_versions_from_changelog; 3, parameters; 4, block; 5, identifier:changelog; 6, expression_statement; 7, expression_statement; 8, return_statement; 9, comment:"""
      Return all released versions from given ``changelog``, sorted.
  
      :param dict changelog:
          A changelog dict as returned by ``releases.util.parse_changelog``.
  
      :returns: A sorted list of `semantic_version.Version` objects.
      """; 10, assignment; 11, call; 12, identifier:versions; 13, list_comprehension; 14, identifier:sorted; 15, argument_list; 16, call; 17, for_in_clause; 18, if_clause; 19, identifier:versions; 20, identifier:Version; 21, argument_list; 22, identifier:x; 23, identifier:changelog; 24, call; 25, identifier:x; 26, attribute; 27, argument_list; 28, identifier:BUGFIX_RELEASE_RE; 29, identifier:match; 30, identifier:x
code: def _versions_from_changelog(changelog):
      """
      Return all released versions from given ``changelog``, sorted.
  
      :param dict changelog:
          A changelog dict as returned by ``releases.util.parse_changelog``.
  
      :returns: A sorted list of `semantic_version.Version` objects.
      """
      versions = [Version(x) for x in changelog if BUGFIX_RELEASE_RE.match(x)]
      return sorted(versions)