code: def test_train_testplit_list_input(setup):
      # Check that when y is a list / list of string labels, it works.
      X = np.ones(7)
      y1 = ["1"] * 4 + ["0"] * 3
      y2 = np.hstack((np.ones(4), np.zeros(3)))
      y3 = y2.tolist()
  
      for stratify in (False,):
          X_train1, X_test1, y_train1, y_test1 = train_test_split(
              X, y1, stratify=y1 if stratify else None, random_state=0
          )
          X_train2, X_test2, y_train2, y_test2 = train_test_split(
              X, y2, stratify=y2 if stratify else None, random_state=0
          )
          X_train3, X_test3, y_train3, y_test3 = train_test_split(
              X, y3, stratify=y3 if stratify else None, random_state=0
          )
  
          np.testing.assert_equal(X_train1, X_train2)
          np.testing.assert_equal(y_train2, y_train3)
          np.testing.assert_equal(X_test1, X_test3)
          np.testing.assert_equal(y_test3, y_test2)
  
imports: import itertools
  import numpy
  import pandas
  import pytest
  from ....None import dataframe
  from ....None import tensor
  from ....dataframe.core import DATAFRAME_TYPE
  from ....lib.sparse import SparseNDArray
  from ...utils.validation import _num_samples
  from ..None import train_test_split, KFold
label_desc: Use image node_id 7 for calling a global function with example usage: test_train_testplit_list_input(setup) without return types