<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sort_potentials(potentials, use_copy=True):
 """ Sort a list of ECP potentials into a standard order The order within a potential is not modified. The order of the shell list is in increasing angular momentum, with the largest angular momentum being moved to the front. If use_copy is True, the input potentials are not modified. """


    if use_copy:
        potentials = copy.deepcopy(potentials)

    # Sort by increasing AM, then move the last element to the front
    potentials = list(sorted(potentials, key=lambda x: x['angular_momentum']))
    potentials.insert(0, potentials.pop())
    return potentials