code: def test_misconfiguration():
      with pytest.raises(ValueError, match="[0, 99]"):
          SplitDataset(range(100), indices=[100])
  
      with pytest.raises(ValueError, match="[0, 49]"):
          SplitDataset(range(50), indices=[-1])
  
      with pytest.raises(ValueError, match="[0, 49]"):
          SplitDataset(list(range(50)) + list(range(50)), indices=[-1])
  
      with pytest.raises(ValueError, match="[0, 99]"):
          SplitDataset(
              list(range(50)) + list(range(50)),
              indices=[-1],
              use_duplicated_indices=True,
          )
  
      with pytest.raises(TypeError, match="indices should be a list"):
          SplitDataset(list(range(100)), indices="not a list")
  
file_path: lightning-flash/tests/core/data/test_splits.py
imports: from copy import deepcopy
  import numpy
  import pytest
  from flash.core.data.data_module import DataModule
  from flash.core.data.splits import SplitDataset
  from flash.core.utilities.imports import _TOPIC_CORE_AVAILABLE
label_desc: Use image node_id 2 for calling a global function with example usage: test_misconfiguration() without return types