code: def track_flops(graph, feat_size, num_heads):
      device = utils.get_bench_device()
      graph = utils.get_graph(graph, format="coo").to(device)
      if num_heads == 0:
          x = torch.randn(graph.num_nodes(), feat_size, device=device)
      else:
          x = torch.randn(
              graph.num_nodes(),
              num_heads,
              feat_size // num_heads,
              device=device,
          )
  
      # dry run
      for i in range(3):
          y = dgl.ops.u_dot_v(graph, x, x)
  
      # timing
      with utils.Timer(device) as t:
          for i in range(10):
              y = dgl.ops.u_dot_v(graph, x, x)
  
      return calc_gflops(
          graph, feat_size, num_heads, t.elapsed_secs / 10
      )
  
imports: import time
  import dgl
  import torch
  from ..None import utils
label_desc: Use image node_id 2 for calling a global function with example usage: track_flops(graph, feat_size, num_heads) and returns: calc_gflops