code: def test_oasst_data_automatic_split(tmp_path: pathlib.Path):
      prepare_default_dataset_causal_language_modeling(tmp_path)
      assert len(os.listdir(tmp_path)) > 0, tmp_path
      cfg_mock = MagicMock()
      for file in os.listdir(tmp_path):
          if file.endswith(".pq"):
              cfg_mock.dataset.train_dataframe = os.path.join(
                  tmp_path, file
              )
  
              cfg_mock.dataset.system_column = "None"
              cfg_mock.dataset.prompt_column = ("instruction",)
              cfg_mock.dataset.answer_column = "output"
              cfg_mock.dataset.parent_id_column = "parent_id"
  
              cfg_mock.dataset.validation_strategy = "automatic"
  
              for validation_size in [0.05, 0.1, 0.2, 0.3, 0.4, 0.5]:
                  cfg_mock.dataset.validation_size = validation_size
  
                  train_df, val_df = load_train_valid_data(cfg_mock)
                  assert set(
                      train_df["parent_id"].dropna().values
                  ).isdisjoint(set(val_df["id"].dropna().values))
                  assert set(
                      val_df["parent_id"].dropna().values
                  ).isdisjoint(set(train_df["id"].dropna().values))
                  assert (
                      len(val_df) / (len(train_df) + len(val_df))
                  ) == pytest.approx(validation_size, 0.05)
  
file_path: h2o-llmstudio/tests/src/utils/test_data_utils.py
imports: import os
  import pathlib
  import random
  import unittest
  from unittest.mock import MagicMock
  import pandas
  import pytest
  from llm_studio.app_utils.default_datasets import prepare_default_dataset_causal_language_modeling
  from llm_studio.src.datasets.conversation_chain_handler import ConversationChainHandler
  from llm_studio.src.utils.data_utils import load_train_valid_data
label_desc: Use image node_id 6 for calling a global function with example usage: test_oasst_data_automatic_split(tmp_path) without return types