code: def markdown_table(step):
      # The text summary can also contain Markdown, including Markdown
      # tables. Markdown tables look like this:
      #
      #     | hello | there |
      #     |-------|-------|
      #     | this  | is    |
      #     | a     | table |
      #
      # The leading and trailing pipes in each row are optional, and the text
      # doesn't actually have to be neatly aligned, so we can create these
      # pretty easily. Let's do so.
      header_row = "Pounds of chocolate | Happiness"
      chocolate = tf.range(step)
      happiness = tf.square(chocolate + 1)
      chocolate_column = tf.as_string(chocolate)
      happiness_column = tf.as_string(happiness)
      table_rows = tf.strings.join(
          [chocolate_column, " | ", happiness_column]
      )
      table_body = tf.strings.reduce_join(
          inputs=table_rows, separator="\n"
      )
      table = tf.strings.join(
          [header_row, "---|---", table_body], separator="\n"
      )
      preamble = (
          "We conducted an experiment and found the following data:\n\n"
      )
      result = tf.strings.join([preamble, table])
      tf.summary.text("chocolate_study", result, step)
  
file_path: tensorboard/tensorboard/plugins/text/text_demo.py
imports: from absl import app
  from absl import logging
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: markdown_table(step) without return types