code: def aks_versions_table_format(result):
      
      # pylint: disable=import-error
      from jmespath import compile as compile_jmes, Options
  
      parsed = compile_jmes("""orchestrators[].{
          kubernetesVersion: orchestratorVersion,
          upgrades: upgrades[].orchestratorVersion || [`None available`] | sort_versions(@) | join(`, `, @)
      }""")
      # use ordered dicts so headers are predictable
      results = parsed.search(result, Options(dict_cls=OrderedDict, custom_functions=_custom_functions()))
      return sorted(results, key=lambda x: version_to_tuple(x.get('kubernetesVersion')), reverse=True)
docs: Format get-versions results as a summary for display with "-o table".