code: def _get_operator_profile(operator_name, operator_profile_results):
      operator_profile = {}
  
      # alias map : dictionary of the form {"alias" : "registered_name"}
      # allows to retrieve alias operator profile from the profiler results
      alias_map = {
          "broadcast_plus": "broadcast_add",
          "broadcast_minus": "broadcast_sub",
          "flatten": "Flatten",
          "max_axis": "max",
          "Custom": "CustomAddOne",
          "swapaxes": "SwapAxis",
          "flip": "reverse",
          "reshape": "Reshape",
          "crop": "slice",
          "sum_axis": "sum",
          "min_axis": "min",
          "ctc_loss": "CTCLoss",
          "fill_element_0index": "TernaryOp",
          "identity": "_copy",
          "ElementWiseSum": "add_n",
          "choose_element_0index": "pick",
          "stop_gradient": "BlockGrad",
          "broadcast_axes": "broadcast_axis",
      }
  
      op_name = None
  
      if operator_name in alias_map:
          op_name = alias_map[operator_name]
      else:
          op_name = operator_name
  
      # Variables to store forward/backward performance results
      forward_res, backward_res = None, None
  
      for line in operator_profile_results:
          if op_name in line or op_name[:3] + " " in line:
              operation = line.split()[0]
              operation_avg_time = float(line.split()[-1])
              if "_backward" in operation:
                  backward_res = operation_avg_time
              else:
                  forward_res = operation_avg_time
  
      # Add forward and backward performance results to the dict in the correct order
      if forward_res:
          operator_profile[
              "avg_time_forward_" + operator_name
          ] = forward_res
  
      if backward_res:
          operator_profile[
              "avg_time_backward_" + operator_name
          ] = backward_res
  
      return operator_profile
  
file_path: mxnet/benchmark/opperf/utils/profiler_utils.py
imports: import time
  import functools
  import numpy
  from .common_utils import merge_map_list
  from mxnet import profiler
label_desc: Use image node_id 2 for calling a global function with example usage: _get_operator_profile(operator_name, operator_profile_results) and returns: operator_profile