def required_get(data: dict, field: str):
    """
    Tries to obtain the field from the dictionary and throws the
    error in case it was not found.
    """
    try:
        return data[field]
    except KeyError as ex:
        raise Exception(f"no required key {field} found") from ex