from typing import Dict
from typing import List


def get_ao_conversion(new_ao_order: Dict[int, List[int]], old_ao_order: Dict[int, List[int]]) -> Dict[int, List[int]]:
    """
    This function determines the conversion of AO ordering for each angular momentum between the CCA standard and the
    provided program harness.
    """

    to_new_order = {}
    for ang_mom in old_ao_order.keys():
        old_order = old_ao_order[ang_mom]
        new_order = new_ao_order[ang_mom]
        sort_indices = []
        for element in new_order:
            sort_indices.append(old_order.index(element))

        to_new_order[ang_mom] = sort_indices

    return to_new_order