<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exposures_for_layer(layer_geometry_key):
 """Get hazard categories form layer_geometry_key :param layer_geometry_key: The geometry key :type layer_geometry_key: str :returns: List of hazard :rtype: list """

    result = []
    for exposure in exposure_all:
        if layer_geometry_key in exposure.get('allowed_geometries'):
            result.append(exposure)

    return sorted(result, key=lambda k: k['key'])