class_docstr: Saves data in event and summary protos for tensorboard.
class_docstr_tok: ["Saves","data","in","event","and","summary","protos","for","tensorboard","."]
docstr: Saves a text summary.
  
  Args:
    tag: str: label for this data
    textdata: string
    step: int: training step
  Note: markdown formatting is rendered by tensorboard.
docstr_tok: ["Saves","a","text","summary",".","Args",":","tag",":","str",":","label","for","this","data","textdata",":","string","step",":","int",":","training","step","Note",":","markdown","formatting","is","rendered","by","tensorboard","."]
code: def text(self, tag, textdata, step):
      """Saves a text summary.
  
      Args:
        tag: str: label for this data
        textdata: string
        step: int: training step
      Note: markdown formatting is rendered by tensorboard.
      """
      if not isinstance(textdata, (str, bytes)):
          raise ValueError(
              "`textdata` should be of the type `str` or `bytes`."
          )
      with self._as_default(self._event_writer):
          tf.summary.text(
              name=tag, data=tf.constant(textdata), step=step
          )
  
file_path: flax/flax/metrics/tensorboard.py
imports: import contextlib
  import functools
  import os
  import numpy
  import tensorflow
  from tensorboard.plugins.hparams import api
  from flax import io
label_desc: Use image node_id 8 for calling the SummaryWriter obj's underlying member method code with example usage: obj.text(tag, textdata, step) without return types