class_docstr: Saves model topology, losses & metrics for tensorboard and tensorboard projector during training
code: def before_fit(self):
      self.run = (
          not hasattr(self.learn, "lr_finder")
          and not hasattr(self, "gather_preds")
          and rank_distrib() == 0
      )
      if not self.run:
          return
      self._setup_writer()
      if self.trace_model:
          if hasattr(self.learn, "mixed_precision"):
              raise Exception(
                  "Can't trace model in mixed precision, pass `trace_model=False` or don't use FP16."
              )
          b = self.dls.one_batch()
          self.learn._split(b)
          self.writer.add_graph(self.model, *self.xb)
  
imports: from __future__ import annotations
  from ..basics import *
  import tensorboard
  from torch.utils.tensorboard import SummaryWriter
  from .fp16 import ModelToHalf
  from .hook import hook_output
  from ..text.all import LMLearner, TextLearner
  from ..vision.data import *
  from ..vision.core import TensorPoint, TensorBBox
label_desc: Use image node_id 2 for calling the TensorBoardCallback obj's underlying member method code with example usage: obj.before_fit() without return types