code: def test_split_data_by_label(model_data: RasaModelData):
      split_model_data = model_data._split_by_label_ids(
          model_data.data,
          model_data.get("label", "ids")[0],
          np.array([0, 1]),
      )
  
      assert len(split_model_data) == 2
      for s in split_model_data:
          assert len(set(s.get("label", "ids")[0])) == 1
  
      for key, attribute_data in split_model_data[0].items():
          for sub_key, features in attribute_data.items():
              assert len(features) == len(model_data.data[key][sub_key])
              assert len(features[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 2 for calling a global function with example usage: test_split_data_by_label(model_data) without return types