def METHOD_NAME() -> None:
    # Reject single values by default, even if they're the expected type.
    with pytest.raises(ValueError):
        ensure_list(0, expected_type=int)
    with pytest.raises(ValueError):
        ensure_list(False, expected_type=bool)
    # Allow wrapping single values into a list.
    assert ensure_list(0, expected_type=int, allow_single_scalar=True) == [0]
    assert ensure_list(True, expected_type=bool, allow_single_scalar=True) == [True]
    arbitrary_object = object()
    assert ensure_list(arbitrary_object, expected_type=object, allow_single_scalar=True) == [
        arbitrary_object
    ]
    ensure_int_list = partial(ensure_list, expected_type=int)
    # Keep lists as lists
    assert ensure_int_list([]) == []
    assert ensure_int_list([0]) == [0]
    assert ensure_int_list([0, 1, 2]) == [0, 1, 2]
    # Convert other iterable types to a list
    assert ensure_int_list((0,)) == [0]
    assert ensure_int_list({0}) == [0]
    assert ensure_int_list({0: "hello"}) == [0]
    # Perform runtime type checks
    with pytest.raises(ValueError):
        ensure_int_list(["bad"])
    with pytest.raises(ValueError):
        ensure_int_list([0.0])
    with pytest.raises(ValueError):
        ensure_int_list([0, 1, "sneaky", 2, 3])