def METHOD_NAME(c, RE, hw):
    RE.subscribe(c.v1.insert)
    (should_match,) = get_uids(RE(count([hw.det]), foo="a"))
    (should_not_match,) = get_uids(RE(count([hw.det]), foo="b"))
    expected = {
        "metadata": {
            "start.foo": [{"value": "a", "count": 1}, {"value": "b", "count": 1}]
        },
        "structure_families": [{"value": "container", "count": 2}],
        "specs": [{"value": [{"name": "BlueskyRun", "version": "1"}], "count": 2}],
    }
    results = c.distinct("foo", structure_families=True, specs=True, counts=True)
    assert results["metadata"] == expected["metadata"]
    assert results["specs"] == expected["specs"]
    assert results["structure_families"] == expected["structure_families"]