class_docstr: Builds graphs and other summary information from eventlogs.
docstr: Builds a graph of the results and outputs to a .png.
  
  Args:
    agg_data: 2d array of data to be graphed.
    num_runs: Number of columns of runs in the data.
docstr_tok: ["Builds","a","graph","of","the","results","and","outputs","to","a",".png",".","Args",":","agg_data",":","2d","array","of","data","to","be","graphed",".","num_runs",":","Number","of","columns","of","runs","in","the","data","."]
code: def _output_graph(
      self, agg_data: List[Sequence[Number]], num_runs: int
  ):
      """Builds a graph of the results and outputs to a .png.
  
      Args:
        agg_data: 2d array of data to be graphed.
        num_runs: Number of columns of runs in the data.
      """
      # Build data frames
      columns = ["step"]
      columns.extend([str(i) for i in range(num_runs)])
      # csv contains aggregate info that will get excluded in the pd.melt.
      columns.extend(["median", "mean"])
      print(columns)
      df = pd.DataFrame(agg_data, columns=columns)
      logging.debug("Dataframes datatypes: %s", df.dtypes)
      new_pd = pd.melt(
          df,
          id_vars="step",
          value_vars=list(df.columns[1 : num_runs + 1]),
          var_name="run",
          value_name=self.yaxis_title,
      )
      logging.info("DataFrame to graph:\n%s", new_pd)
      # Build graph
      plt.figure(figsize=(10, 5))
      ax = sns.lineplot(
          data=new_pd,
          x="step",
          y=self.yaxis_title,
          estimator=self.graph_agg,
      )
      ax.set_title(self.title)
      ax.set(xlabel=self.xaxis_title)
      plt.ticklabel_format(style="plain", axis="x")
      graph_path = os.path.join(
          self.output_path, self.output_prefix + "_graph.png"
      )
      plt.savefig(graph_path)
  
imports: import csv
  import enum
  import os
  from typing import Dict, List, Optional, Sequence, Tuple, Union
  from absl import app
  from absl import flags
  from absl import logging
  import matplotlib.pyplot
  import numpy
  import pandas
  import seaborn
  from tf_agents.benchmark import utils
label_desc: Use image node_id 5 for calling the StatsBuilder obj's underlying member method code with example usage: obj._output_graph(agg_data, num_runs) without return types