code: def plot_batch(cls, batch, cfg) -> PlotData:
      tokenizer = get_tokenizer(cfg)
      df = create_batch_prediction_df(
          batch,
          tokenizer,
          ids_for_tokenized_text="chosen_input_ids",
          labels_column="chosen_labels",
      )
      path = os.path.join(cfg.output_directory, "batch_viz.parquet")
      df.to_parquet(path)
      return PlotData(path, encoding="df")
  
file_path: h2o-llmstudio/llm_studio/src/plots/text_dpo_modeling_plots.py
imports: import hashlib
  import os
  from typing import Any, Dict, List
  import pandas
  from llm_studio.src.datasets.conversation_chain_handler import get_conversation_chains
  from llm_studio.src.datasets.text_utils import get_tokenizer
  from llm_studio.src.plots.text_causal_language_modeling_plots import create_batch_prediction_df, plot_validation_predictions
  from llm_studio.src.utils.data_utils import read_dataframe_drop_missing_labels
  from llm_studio.src.utils.plot_utils import PlotData, format_for_markdown_visualization
  from llm_studio.src.utils.utils import PatchedAttribute
label_desc: Use image node_id 1 for calling the Plots obj's underlying member method code with example usage: obj.plot_batch(cls, batch, cfg) and returns: PlotData