class_docstr: Hold all parsed data to serve for user requests.
class_docstr_tok: ["Hold","all","parsed","data","to","serve","for","user","requests","."]
code: def get_memory_curve(self, device_type, time_unit="ms"):
      if not self.memory_parser:
          return
      curves = self.memory_curve[device_type]
      data = {}
      data["name"] = {
          "Allocated": "已分配",
          "Reserved": "已预留",
          "PeakAllocated": "最大已分配",
          "PeakReserved": "最大已预留",
      }
      for key, events in curves.items():
          data[key] = []
          sorted_events = sorted(events, key=lambda x: x[0])
          for item in sorted_events:
              timestamp = item[0]
              size = item[1]
              event_name = item[2]
              data[key].append(
                  [
                      format_time(timestamp, time_unit),
                      format_memory(size, "KB"),
                      event_name,
                  ]
              )
      return data
  
imports: from collections import defaultdict
  from collections import OrderedDict
  from .parser.distributed_parser import DistributedParser
  from .parser.kernel_parser import KernelParser
  from .parser.memory_parser import MemoryParser
  from .parser.operator_parser import OperatorParser
  from .parser.overview_parser import CPUType
  from .parser.overview_parser import GPUType
  from .parser.overview_parser import OverviewParser
  from .parser.trace_parser import TraceParser
  from .parser.utils import format_float
  from .parser.utils import format_memory
  from .parser.utils import format_ratio
  from .parser.utils import format_time
  from .parser.utils import traverse_tree
label_desc: Use image node_id 17 for calling the ProfilerData obj's underlying member method code with example usage: obj.get_memory_curve(device_type, time_unit) and returns: data