code: def test_invalid_inputs():
      # Test bad affinity
      with pytest.raises(ValueError):
          AgglomerativeClustering(affinity="doesntexist")
  
      with pytest.raises(ValueError):
          AgglomerativeClustering(linkage="doesntexist")
  
      with pytest.raises(ValueError):
          AgglomerativeClustering(connectivity="doesntexist")
  
      with pytest.raises(ValueError):
          AgglomerativeClustering(n_neighbors=1)
  
      with pytest.raises(ValueError):
          AgglomerativeClustering(n_neighbors=1024)
  
      with pytest.raises(ValueError):
          AgglomerativeClustering(n_clusters=0)
  
      with pytest.raises(ValueError):
          AgglomerativeClustering(n_clusters=500).fit(cp.ones((2, 5)))
  
file_path: cuml/python/cuml/tests/test_agglomerative.py
imports: import pytest
  from cuml.cluster import AgglomerativeClustering
  from cuml.datasets import make_blobs
  from cuml.metrics import adjusted_rand_score
  from sklearn import cluster
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 3 for calling a global function with example usage: test_invalid_inputs() without return types