code: def test_getitem():
      df = pd.DataFrame(
          {
              "prompt": ["prompt 1", "prompt 2", "prompt 3"],
              "answer": ["answer 1", "answer 2", "answer 3"],
              "parent_id": [None, 0, 1],
              "system": ["system 1", "system 2", "system 3"],
              "id": [0, 1, 2],
          }
      )
  
      cfg = ConfigProblemBase(
          dataset=ConfigNLPCausalLMDataset(
              prompt_column=("prompt",),
              answer_column="answer",
              parent_id_column="parent_id",
              system_column="system",
              text_system_start="System:",
              text_prompt_start="Prompt:",
              text_answer_separator="Answer:",
              add_eos_token_to_answer=True,
              limit_chained_samples=True,
          ),
          tokenizer=ConfigNLPCausalLMTokenizer(max_length=513),
      )
  
      cfg.llm_backbone = "EleutherAI/pythia-2.8b-deduped"
  
      dataset = CustomDataset(df, cfg)
      assert len(dataset) == 1
  
      result = dataset[0]
      assert isinstance(result, dict)
      assert set(result.keys()) == {
          "labels",
          "input_ids",
          "attention_mask",
          "prompt_input_ids",
          "prompt_attention_mask",
          "answer_input_ids",
          "answer_attention_mask",
      }
  
      assert (
          dataset.tokenizer.decode(
              result["input_ids"], skip_special_tokens=True
          )
          == "System:system 1"
          "Prompt:prompt 1"
          "Answer:answer 1"
          "Prompt:prompt 2"
          "Answer:answer 2"
          "Prompt:prompt 3"
          "Answer:answer 3"
      )
  
      assert (
          dataset.tokenizer.decode(
              result["prompt_input_ids"], skip_special_tokens=True
          )
          == "System:system 1"
          "Prompt:prompt 1"
          "Answer:answer 1"
          "Prompt:prompt 2"
          "Answer:answer 2"
          "Prompt:prompt 3"
          "Answer:"
      )
  
      assert (
          dataset.tokenizer.decode(
              result["input_ids"], skip_special_tokens=False
          )
          == "<|endoftext|>" * 475 + "System:system 1"
          "<|endoftext|>"
          "Prompt:prompt 1"
          "<|endoftext|>"
          "Answer:answer 1"
          "<|endoftext|>"
          "Prompt:prompt 2"
          "<|endoftext|>"
          "Answer:answer 2"
          "<|endoftext|>"
          "Prompt:prompt 3"
          "<|endoftext|>"
          "Answer:answer 3"
          "<|endoftext|>"
      )
  
      assert result["input_ids"].shape == (513,)
      assert result["prompt_input_ids"].shape == (513,)
  
file_path: h2o-llmstudio/tests/src/datasets/test_text_causal_language_modeling_ds.py
imports: from unittest import mock
  from unittest.mock import MagicMock, patch
  import numpy
  import pandas
  import pytest
  from llm_studio.app_utils.default_datasets import prepare_default_dataset_causal_language_modeling
  from llm_studio.python_configs.text_causal_language_modeling_config import ConfigNLPCausalLMDataset, ConfigNLPCausalLMTokenizer, ConfigProblemBase
  from llm_studio.src.datasets.text_causal_language_modeling_ds import CustomDataset
label_desc: Use image node_id 6 for calling a global function with example usage: test_getitem() without return types