code: def test_train_val_split(model_data: RasaModelData):
      train_model_data, test_model_data = model_data.split(2, 42)
  
      for key, values in model_data.items():
          assert len(values) == len(train_model_data.get(key))
          assert len(values) == len(test_model_data.get(key))
          for sub_key, data in values.items():
              assert len(data) == len(
                  train_model_data.get(key, sub_key)
              )
              assert len(data) == len(test_model_data.get(key, sub_key))
              for i, v in enumerate(data):
                  if isinstance(v[0], list):
                      assert (
                          v[0][0].dtype
                          == train_model_data.get(key, sub_key)[i][0][
                              0
                          ].dtype
                      )
                  else:
                      assert (
                          v[0].dtype
                          == train_model_data.get(key, sub_key)[i][
                              0
                          ].dtype
                      )
  
      for values in train_model_data.values():
          for data in values.values():
              for v in data:
                  assert np.array(v).shape[0] == 3
  
      for values in test_model_data.values():
          for data in values.values():
              for v in data:
                  assert np.array(v).shape[0] == 2
  
file_path: rasa/tests/utils/tensorflow/test_model_data.py
imports: import copy
  import pytest
  import numpy
  from rasa.utils.tensorflow.model_data import RasaModelData
label_desc: Use image node_id 4 for calling a global function with example usage: test_train_val_split(model_data) without return types