code: def test_dataset_label_is_correct(df_with_conversation_chain_ids):
      cfg = ConfigProblemBase(
          dataset=ConfigDPODataset(
              prompt_column=("prompt_column",),
              answer_column="answer_column",
              rejected_answer_column="rejected_answer_column",
              parent_id_column="parent_id_column",
          )
      )
      dataset = CustomDataset(
          df_with_conversation_chain_ids, cfg, mode="train"
      )
  
      for idx, item in enumerate(dataset):
          sample = dataset[idx]
          chosen_response = dataset.tokenizer.decode(
              sample["chosen_labels"][sample["chosen_labels"] != -100],
              skip_special_tokens=True,
          )
          rejected_response = dataset.tokenizer.decode(
              sample["rejected_labels"][
                  sample["rejected_labels"] != -100
              ],
              skip_special_tokens=True,
          )
          prompt = dataset.tokenizer.decode(
              sample["prompt_input_ids"][
                  sample["prompt_input_ids"] != 0
              ],
              skip_special_tokens=True,
          )
  
          assert (
              prompt == f"<|prompt|>prompt {idx * 5 + 1} "
              f"<|answer|> response {idx * 5 + 1} "
              f"<|prompt|>prompt {idx * 5 + 2} "
              f"<|answer|> response {idx * 5 + 2} "
              f"<|prompt|>prompt {idx * 5 + 3} "
              f"<|answer|> response {idx * 5 + 3} "
              f"<|prompt|>prompt {idx * 5 + 4} "
              f"<|answer|> response {idx * 5 + 4} "
              f"<|prompt|>prompt {idx * 5 + 5} "
              "<|answer|>"
          )
          assert chosen_response == f"chosen_response {idx * 5 + 5}"
          assert rejected_response == f"rejected_response {idx * 5 + 5}"
  
file_path: h2o-llmstudio/tests/src/datasets/test_text_dpo_modeling_ds.py
imports: import numpy
  import pandas
  import pytest
  import torch
  from tqdm import tqdm
  from llm_studio.python_configs.text_causal_language_modeling_config import ConfigNLPCausalLMTokenizer
  from llm_studio.python_configs.text_dpo_modeling_config import ConfigDPODataset, ConfigProblemBase
  from llm_studio.src.datasets.text_dpo_modeling_ds import CustomDataset
label_desc: Use image node_id 4 for calling a global function with example usage: test_dataset_label_is_correct(df_with_conversation_chain_ids) without return types