def METHOD_NAME(device):
    capacity = 10
    hashmap = o3c.HashMap(capacity, o3c.int64, [1], o3c.int64, [1], device)
    keys = o3c.Tensor([100, 300, 500, 700, 900, 900],
                      dtype=o3c.int64,
                      device=device)
    buf_indices, masks = hashmap.activate(keys)
    assert masks.to(o3c.int64).sum() == 5
    valid_indices = buf_indices[masks].to(o3c.int64)
    valid_keys = hashmap.key_tensor()[valid_indices]
    np.testing.assert_equal(np.sort(valid_keys.cpu().numpy().flatten()),
                            np.array([100, 300, 500, 700, 900]))