def determine_result_id(event):
    """
    This function determines the result of an event

    Args:
    event (pd.Series): Wyscout event Series

    Returns:
    int: result of the action
    """
    if event["offside"] == 1:
        return 2
    elif event["type_id"] == 2:  # foul
        return 1
    elif event["goal"]:  # goal
        return 1
    elif event["own_goal"]:  # own goal
        return 3
    elif event["subtype_id"] in [100, 33, 35]:  # no goal, so 0
        return 0
    elif event["accurate"]:
        return 1
    elif event["not_accurate"]:
        return 0
    elif (
        event["interception"] or event["clearance"] or event["subtype_id"] == 71
    ):  # interception or clearance always success
        return 1
    elif event["type_id"] == 9:  # keeper save always success
        return 1
    else:
        # no idea, assume it was successful
        return 1