class_docstr: Scalars Plugin for TensorBoard.
docstr: Result of the form `(body, mime_type)`.
docstr_tok: ["Result","of","the","form","`","(","body",",","mime_type",")","`","."]
code: def scalars_impl(self, ctx, tag, run, experiment, output_format):
      """Result of the form `(body, mime_type)`."""
      all_scalars = self._data_provider.read_scalars(
          ctx,
          experiment_id=experiment,
          plugin_name=metadata.PLUGIN_NAME,
          downsample=self._downsample_to,
          run_tag_filter=provider.RunTagFilter(runs=[run], tags=[tag]),
      )
      scalars = all_scalars.get(run, {}).get(tag, None)
      if scalars is None:
          raise errors.NotFoundError(
              "No scalar data for run=%r, tag=%r" % (run, tag)
          )
      values = [(x.wall_time, x.step, x.value) for x in scalars]
      if output_format == OutputFormat.CSV:
          string_io = io.StringIO()
          writer = csv.writer(string_io)
          writer.writerow(["Wall time", "Step", "Value"])
          writer.writerows(values)
          return (string_io.getvalue(), "text/csv")
      else:
          return (values, "application/json")
  
imports: import csv
  import io
  import werkzeug.exceptions
  from werkzeug import wrappers
  from tensorboard import errors
  from tensorboard import plugin_util
  from tensorboard.backend import http_util
  from tensorboard.data import provider
  from tensorboard.plugins import base_plugin
  from tensorboard.plugins.scalar import metadata
label_desc: Use image node_id 6 for calling the ScalarsPlugin obj's underlying member method code with example usage: obj.scalars_impl(ctx, tag, run, experiment, output_format) and returns: string_io,  str, values,  str