class_docstr: The base monitor class. All monitors should inherit from this class.
  Subclasses should implement the following methods:
  - export_schema
  - export_data
  to export the schema and data to the desired format.
docstr: Stop recording data. This method should be called after logging all data.
docstr_tok: ["Stop","recording","data",".","This","method","should","be","called","after","logging","all","data","."]
code: def stop_record(self) -> None:
      """
      Stop recording data. This method should be called after logging all data.
      """
      datas: dict[str, collections.deque[DT]] = MON_DATAS_VAR.get()  # type: ignore
      assert datas is not None
  
      if len(datas) == 0:
          logger.warning(
              "No data logged in this record. Will skip output."
          )
          return
  
      if self.columns_schema is None:
          columns = MON_COLUMN_VAR.get()
          assert columns is not None
          self.columns_schema = columns
          self.export_schema(columns)
          MON_COLUMN_VAR.set(None)
  
      if len(set(len(q) for q in datas.values())) != 1:
          assert ValueError("All columns should have the same length.")
      self.export_data(datas)
  
      MON_DATAS_VAR.set(None)
  
imports: from __future__ import annotations
  import collections
  import contextvars
  import logging
  import typing
label_desc: Use image node_id 3 for calling the MonitorBase obj's underlying member method code with example usage: obj.stop_record() without return types