def METHOD_NAME(device, simulation_factory, lattice_snapshot_factory):
    """Test that Clusters produces finite size clusters."""
    if (isinstance(device, hoomd.device.GPU)
            and hoomd.version.gpu_platform == 'ROCm'):
        pytest.xfail("Clusters fails on ROCm (#1605)")
    sim = simulation_factory(
        lattice_snapshot_factory(particle_types=['A', 'B'],
                                 dimensions=3,
                                 a=4,
                                 n=7,
                                 r=0.1))
    mc = hoomd.hpmc.integrate.Sphere(default_d=0.1, default_a=0.1)
    mc.shape['A'] = dict(diameter=1.1)
    mc.shape['B'] = dict(diameter=1.3)
    sim.operations.integrator = mc
    cl = hoomd.hpmc.update.Clusters(trigger=hoomd.trigger.Periodic(5),
                                    pivot_move_probability=0.5)
    sim.operations.updaters.append(cl)
    sim.run(10)
    avg = cl.avg_cluster_size
    assert avg > 0