code: def cprofileme():
      print("--------------- cProfile -----------------")
      print("py")
      cProfile.run("py()", sort=-1)
      gc.collect()
      torch.cuda.empty_cache()
      print("cpp")
      cProfile.run("cpp()", sort=-1)
      gc.collect()
      torch.cuda.empty_cache()
      print("apex")
      cProfile.run("apex()", sort=-1)
      gc.collect()
      torch.cuda.empty_cache()
  
file_path: H2O/h2o_flexgen/benchmark/third_party/DeepSpeed/tests/benchmarks/flatten_bench.py
imports: import argparse
  import gc
  import torch
  from torch._utils import _flatten_dense_tensors
  from deepspeed.ops.op_builder import UtilsBuilder
  from apex_C import flatten
  import cProfile
  import timeit
label_desc: Use image node_id 4 for calling a global function with example usage: cprofileme() without return types