def event_loop_policy(request) -> str:
    """Return the active event loop policy for the test.

    Valid values are "default" and "uvloop".

    The default implementation defers to the `event_loop_policy` marker
    when it is set and otherwise selects a default policy based on the
    characteristics of the test being run.
    """
    marker = request.node.get_closest_marker("event_loop_policy")
    if marker:
        assert len(marker.args) == 1, f"event_loop_policy marker accepts a single argument but received: {repr(marker.args)}"
        event_loop_policy = marker.args[0]
    else:
        event_loop_policy = "uvloop"

    valid_policies = ("default", "uvloop")
    assert event_loop_policy in valid_policies, f"invalid event_loop_policy marker: \"{event_loop_policy}\" is not in {repr(valid_policies)}"

    return event_loop_policy