code: def test_conversation_chain_handles_nan_parent_ids(df_with_nan, cfg):
      handler = ConversationChainHandler(df_with_nan, cfg)
      assert handler.conversation_chain_ids == [
          [9, 8, 7, 6, 5, 4, 3, 2, 1, 0],
          [10],
          [11],
          [12],
      ]
      assert len(handler) == 4
      assert handler[0] == {
          "prompts": [
              "prompt10",
              "prompt9",
              "prompt8",
              "prompt7",
              "prompt6",
              "prompt5",
              "prompt4",
              "prompt3",
              "prompt2",
              "prompt1",
          ],
          "answers": [
              "answer10",
              "answer9",
              "answer8",
              "answer7",
              "answer6",
              "answer5",
              "answer4",
              "answer3",
              "answer2",
              "answer1",
          ],
          "systems": [
              "system10",
              "system9",
              "system8",
              "system7",
              "system6",
              "system5",
              "system4",
              "system3",
              "system2",
              "system1",
          ],
      }
      assert handler[1] == {
          "prompts": ["prompt11"],
          "answers": ["answer11"],
          "systems": ["system11"],
      }
      assert handler[2] == {
          "prompts": ["prompt12"],
          "answers": ["answer12"],
          "systems": ["system12"],
      }
      assert handler[3] == {
          "prompts": ["prompt13"],
          "answers": ["answer13"],
          "systems": ["system13"],
      }
  
file_path: h2o-llmstudio/tests/src/datasets/test_conversation_chain_handler.py
imports: import time
  from unittest import mock
  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
label_desc: Use image node_id 9 for calling a global function with example usage: test_conversation_chain_handles_nan_parent_ids(df_with_nan, cfg) without return types