class_docstr: Base class for all types of memory monitor.
  All monitors should have a list called `time_stamps` and a list called `mem_stats`.
class_docstr_tok: ["Base","class","for","all","types","of","memory","monitor",".","All","monitors","should","have","a","list","called","`","time_stamps","`","and","a","list","called","`","mem_stats","`","."]
code: def __len__(self):
      return len(self.mem_stats)
  
imports: import json
  from abc import abstractmethod
  from concurrent.futures import ThreadPoolExecutor
  from time import sleep, time
  import torch
  from colossalai.utils import get_current_device
label_desc: Use image node_id 2 for calling the MemoryMonitor obj's underlying member method code with example usage: obj.__len__() and returns: len