def get_category(risk_attr):
    """
    Assigns a category to a given risk attribute,
    that is to a human at a given hour of a given day

    Args:
        risk_attr (dict): dictionnary representing a human's risk at a given time

    Returns:
        str: category for this person
    """

    if risk_attr["test"]:
        return "D"

    if risk_attr["infectious"] and risk_attr["symptoms"] == 0:
        return "B"

    if risk_attr["infectious"] and risk_attr["symptoms"] > 0:
        return "C"

    if risk_attr["exposed"]:
        return "A"

    if risk_attr["order_1_is_tested"]:
        return "J"

    if risk_attr["order_1_is_symptomatic"]:
        return "I"

    if risk_attr["order_1_is_presymptomatic"]:
        return "H"

    if risk_attr["order_1_is_exposed"]:
        return "E"

    return "K"