<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def aks_versions_table_format(result):
 """Format get-versions results as a summary for display with "-o table"."""

    # 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)