<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_k8s_versions(cli_ctx, location):
 """Return a list of Kubernetes versions available for a new cluster."""

    from ._client_factory import cf_container_services
    from jmespath import search  # pylint: disable=import-error

    results = cf_container_services(cli_ctx).list_orchestrators(location, resource_type='managedClusters').as_dict()
    # Flatten all the "orchestrator_version" fields into one array
    return search('orchestrators[*].orchestrator_version', results)