code: def test_is_multilabel():
      for group, group_examples in EXAMPLES.items():
          dense_exp = group == "multilabel-indicator"
  
          for example in group_examples:
              # Only mark explicitly defined sparse examples as valid sparse
              # multilabel-indicators
              sparse_exp = dense_exp and issparse(example)
  
              if issparse(example) or (
                  hasattr(example, "__array__")
                  and np.asarray(example).ndim == 2
                  and np.asarray(example).dtype.kind in "biuf"
                  and np.asarray(example).shape[1] > 0
              ):
                  examples_sparse = [
                      sparse_container(example)
                      for sparse_container in (
                          COO_CONTAINERS
                          + CSC_CONTAINERS
                          + CSR_CONTAINERS
                          + DOK_CONTAINERS
                          + LIL_CONTAINERS
                      )
                  ]
                  for exmpl_sparse in examples_sparse:
                      assert sparse_exp == is_multilabel(
                          exmpl_sparse
                      ), f"is_multilabel({exmpl_sparse!r}) should be {sparse_exp}"
  
              # Densify sparse examples before testing
              if issparse(example):
                  example = example.toarray()
  
              assert dense_exp == is_multilabel(
                  example
              ), f"is_multilabel({example!r}) should be {dense_exp}"
  
imports: from itertools import product
  import numpy
  import pytest
  from scipy.sparse import issparse
  from sklearn import config_context, datasets
  from sklearn.model_selection import ShuffleSplit
  from sklearn.svm import SVC
  from sklearn.utils._array_api import yield_namespace_device_dtype_combinations
  from sklearn.utils._testing import _array_api_for_tests, assert_allclose, assert_array_almost_equal, assert_array_equal
  from sklearn.utils.estimator_checks import _NotAnArray
  from sklearn.utils.fixes import COO_CONTAINERS, CSC_CONTAINERS, CSR_CONTAINERS, DOK_CONTAINERS, LIL_CONTAINERS
  from sklearn.utils.metaestimators import _safe_split
  from sklearn.utils.multiclass import _ovr_decision_function, check_classification_targets, class_distribution, is_multilabel, type_of_target, unique_labels
label_desc: Use image node_id 5 for calling a global function with example usage: test_is_multilabel() without return types