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], dtype=o3c.int64, device=device)
    values = o3c.Tensor([1, 3, 5, 7, 9], dtype=o3c.int64, device=device)
    hashmap.insert(keys, values)
    keys = o3c.Tensor([100, 200, 500], dtype=o3c.int64, device=device)
    masks = hashmap.erase(keys)
    np.testing.assert_equal(masks.cpu().numpy(), np.array([True, False, True]))
    assert hashmap.size() == 3
    active_buf_indices = hashmap.active_buf_indices()
    active_indices = active_buf_indices.to(o3c.int64)
    active_keys = hashmap.key_tensor()[active_indices]
    active_values = hashmap.value_tensor()[active_indices]
    active_keys_np = active_keys.cpu().numpy().flatten()
    active_values_np = active_values.cpu().numpy().flatten()
    sorted_i = np.argsort(active_keys_np)
    np.testing.assert_equal(active_keys_np[sorted_i], np.array([300, 700, 900]))
    np.testing.assert_equal(active_values_np[sorted_i], np.array([3, 7, 9]))