def METHOD_NAME():
    """Test custom spaces with space util functions."""
    custom_space = CustomSpace()
    batched_space = batch_space(custom_space, n=2)
    assert batched_space == Tuple([custom_space, custom_space])
    with pytest.raises(
        CustomSpaceError,
        match=re.escape(
            "Space of type `<class 'tests.spaces.utils.CustomSpace'>` doesn't have an registered `iterate` function. Register `<class 'tests.spaces.utils.CustomSpace'>` for `iterate` to support it."
        ),
    ):
        iterate(custom_space, None)
    concatenated_items = concatenate(custom_space, (None, None), out=None)
    assert concatenated_items == (None, None)
    empty_array = create_empty_array(custom_space)
    assert empty_array is None