code: def test_graclus_cluster(test, dtype, device):
      if dtype == torch.bfloat16 and device == torch.device("cuda:0"):
          return
  
      row = tensor(test["row"], torch.long, device)
      col = tensor(test["col"], torch.long, device)
      weight = tensor(test.get("weight"), dtype, device)
  
      cluster = graclus_cluster(row, col, weight)
      assert_correct(row, col, cluster)
  
      jit = torch.jit.script(graclus_cluster)
      cluster = jit(row, col, weight)
      assert_correct(row, col, cluster)
  
imports: from itertools import product
  import pytest
  import torch
  from torch_cluster import graclus_cluster
  from torch_cluster.testing import devices, dtypes, tensor
label_desc: Use image node_id 2 for calling a global function with example usage: test_graclus_cluster(test, dtype, device) without return types