code: def test_convert_container(
      constructor_name,
      container_type,
      dtype,
      superdtype,
  ):
      """Check that we convert the container to the right type of array with the
      right data type."""
      if constructor_name in ("dataframe", "series", "index"):
          # delay the import of pandas within the function to only skip this test
          # instead of the whole file
          container_type = container_type()
      container = [0, 1]
  
      container_converted = _convert_container(
          container,
          constructor_name,
          dtype=dtype,
      )
      assert isinstance(container_converted, container_type)
  
      if constructor_name in ("list", "tuple", "index"):
          # list and tuple will use Python class dtype: int, float
          # pandas index will always use high precision: np.int64 and np.float64
          assert np.issubdtype(type(container_converted[0]), superdtype)
      elif hasattr(container_converted, "dtype"):
          assert container_converted.dtype == dtype
      elif hasattr(container_converted, "dtypes"):
          assert container_converted.dtypes[0] == dtype
  
imports: import atexit
  import os
  import unittest
  import warnings
  import numpy
  import pytest
  from scipy import sparse
  from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
  from sklearn.tree import DecisionTreeClassifier
  from sklearn.utils import _IS_WASM
  from sklearn.utils._testing import TempMemmap, _convert_container, _delete_folder, assert_allclose, assert_allclose_dense_sparse, assert_no_warnings, assert_raise_message, assert_raises, assert_raises_regex, assert_run_python_script_without_output, check_docstring_parameters, create_memmap_backed_data, ignore_warnings, raises, set_random_state
  from sklearn.utils.deprecation import deprecated
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS, parse_version, sp_version
  from sklearn.utils.metaestimators import available_if
label_desc: Use image node_id 16 for calling a global function with example usage: test_convert_container(constructor_name, container_type, dtype, superdtype) without return types