code: def op_memory_events(
      self, run, worker, span, device_type, search_name=None
  ):
      if search_name == "undefined" or not search_name:
          search_name = None
      if device_type == "undefined":
          return
      run_manager = self._reader.get_run_manager(run)
      if run_manager is None:
          return []
      profiler_data = run_manager.get_profiler_data(worker, span)
      if profiler_data:
          return profiler_data.get_op_memory_events(
              device_type, search_name
          )
  
imports: import json
  from .profiler_reader import ProfilerReader
  from visualdl.server.api import gen_result
  from visualdl.server.api import result
label_desc: Use image node_id 29 for calling the ProfilerApi obj's underlying member method code with example usage: obj.op_memory_events(run, worker, span, device_type, search_name) and returns: list, profiler_data