code: def nd_forward_and_profile(op, runs, **kwargs):
      """Helper function to run a given NDArray operator (op) for 'runs' number of times with
      given args and kwargs. Executes ONLY forward pass.
  
      NOTE: This is a sync call and waits for all the operations execution to complete.
  
      Parameters
      ----------
      op: Str
          NDArray operator (Function reference) to execute. Example: mx.nd.add
      runs: int
          Number of time to execute the operation
      kwargs:
          Key value arguments for the NDArray operator (op) being executed.
  
      Returns
      -------
      any results from NDArray operation execution
      """
      for _ in range(runs):
          args = []
          # need to create a new dictionary because can't update dict while iterating
          kwargs_new = dict()
          for key in kwargs:
              # separate positional args from key-worded args
              if key.startswith("args"):
                  args.append(kwargs[key])
              else:
                  kwargs_new[key] = kwargs[key]
          # check for positional args
          if len(args):
              res = op(*args, **kwargs_new)
          else:
              res = op(**kwargs_new)
          nd.waitall()
      return res
  
imports: import numpy
  import mxnet
  import mxnet.ndarray
label_desc: Use image node_id 2 for calling a global function with example usage: nd_forward_and_profile(op, runs) and returns: res