from typing import Mapping
from typing import Any


def from_level_to_severity(logger, log_method, event_dict) -> Mapping[str, Any]:
    """A custom processor for structlog, converts `level` to `severity`"""
    event_dict['severity'] = event_dict.pop('level')
    return event_dict