def assert_count_equal(
    a: Iterable[T] | None,
    b: Iterable[T] | None,
) -> None:
    """
    A pytest-friendly implementation of assertCountEqual.

    Assert that `a` and `b` have the same elements, but maybe in different order.
    This only works for hashable elements.
    """
    assert a is not None
    assert b is not None
    assert collections.Counter(list(a)) == collections.Counter(list(b))

    A pytest-friendly implementation of assertCountEqual.

    Assert that `a` and `b` have the same elements, but maybe in different order.
    This only works for hashable elements.
    
tests/helpers.py