def layer_hazard_classification(layer):
    """Returned this particular hazard classification.

    :param layer: hazard layer or exposure layer
    :type layer: qgis.core.QgsVectorLayer

    :return: Hazard classification.
    :rtype: dict

    .. versionadded:: 4.0
    """
    if not layer.keywords.get('hazard'):
        # return nothing if not hazard layer
        return None

    hazard_classification = None
    # retrieve hazard classification from hazard layer
    for classification in hazard_classes_all:
        classification_name = layer.keywords['classification']
        if classification_name == classification['key']:
            hazard_classification = classification
            break
    return hazard_classification
Returned this particular hazard classification.

    :param layer: hazard layer or exposure layer
    :type layer: qgis.core.QgsVectorLayer

    :return: Hazard classification.
    :rtype: dict

    .. versionadded:: 4.0