code: def measure_cost(
      repeat, scipy_trans_lhs, scipy_dns_lhs, func_name, *args, **kwargs
  ):
      """Measure time cost of running a function"""
      mx.nd.waitall()
      args_list = []
      for arg in args:
          args_list.append(arg)
      start = time.time()
      if scipy_trans_lhs:
          args_list[0] = (
              np.transpose(args_list[0])
              if scipy_dns_lhs
              else sp.spmatrix.transpose(args_list[0])
          )
      for _ in range(repeat):
          func_name(*args_list, **kwargs)
      mx.nd.waitall()
      end = time.time()
      diff = end - start
      return diff / repeat
  
file_path: mxnet/benchmark/python/sparse/dot.py
imports: import ctypes
  import os
  import time
  import argparse
  import subprocess
  import scipy.sparse
  import mxnet
  import numpy
  import numpy.random
  from mxnet.test_utils import rand_ndarray, set_default_device, assert_almost_equal, get_bz2_data
  from mxnet.base import check_call, _LIB
  from util import estimate_density
label_desc: Use image node_id 1 for calling a global function with example usage: measure_cost(repeat, scipy_trans_lhs, scipy_dns_lhs, func_name) and returns: unknown