code: def track_flops(graph, feat_size, reducer):
      device = utils.get_bench_device()
      graph = utils.get_graph(graph, format="csc").to(device)
      x = torch.randn(graph.num_nodes(), feat_size, device=device)
  
      if reducer == "sum":
          op = dgl.ops.copy_u_sum
      elif reducer == "max":
          op = dgl.ops.copy_u_max
      else:
          raise ValueError("Invalid reducer", reducer)
  
      # dry run
      for i in range(3):
          y = op(graph, x)
  
      # timing
      with utils.Timer(device) as t:
          for i in range(10):
              y = op(graph, x)
  
      return calc_gflops(graph, feat_size, 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, reducer) and returns: calc_gflops