class_docstr: Dump all episode metrics to a ``result.csv``.
  
  This is not the correct implementation. It's only used for first iteration.
class_docstr_tok: ["Dump","all","episode","metrics","to","a","``","result.csv","``",".","This","is","not","the","correct","implementation",".","It","'s","only","used","for","first","iteration","."]
code: def clear(self) -> None:
      super().clear()
      self.all_records = []
  
imports: from __future__ import annotations
  import logging
  from collections import defaultdict
  from enum import IntEnum
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Callable, Dict, Generic, List, Sequence, Set, Tuple, TypeVar
  import numpy
  import pandas
  from qlib.log import get_module_logger
label_desc: Use image node_id 2 for calling the CsvWriter obj's underlying member method code with example usage: obj.clear() without return types