<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_layer_modes(subcategory):
 """Return all sorted layer modes from exposure or hazard. :param subcategory: Hazard or Exposure key. :type subcategory: str :returns: List of layer modes definition. :rtype: list """

    layer_modes = definition(subcategory)['layer_modes']
    return sorted(layer_modes, key=lambda k: k['key'])