code: def generate_array_like(input_data, labels=None):
      """Helper function to generate array-like variants of numpy datasets,
      for testing purposes."""
      list_data = input_data.tolist()
      input_data_changed = [input_data, list_data, tuple(list_data)]
      if input_data.ndim >= 2:
          input_data_changed.append(tuple(tuple(x) for x in list_data))
      if input_data.ndim >= 3:
          input_data_changed.append(
              tuple(tuple(tuple(x) for x in y) for y in list_data)
          )
      if input_data.ndim == 2:
          pd = pytest.importorskip("pandas")
          input_data_changed.append(pd.DataFrame(input_data))
      if labels is not None:
          labels_changed = [labels, list(labels), tuple(labels)]
      else:
          labels_changed = [labels]
      return input_data_changed, labels_changed
  
imports: import pytest
  import unittest
  from sklearn.utils.estimator_checks import check_estimator
  from sklearn.base import TransformerMixin
  from sklearn.pipeline import make_pipeline
  from sklearn.utils import check_random_state
  from metric_learn.sklearn_shims import assert_allclose_dense_sparse, set_random_state, _get_args, is_public_parameter, get_scorer
  from metric_learn import Covariance, LFDA, LMNN, MLKR, NCA, ITML_Supervised, LSML_Supervised, MMC_Supervised, RCA_Supervised, SDML_Supervised, SCML_Supervised
  from sklearn import clone
  import numpy
  from sklearn.model_selection import cross_val_score, cross_val_predict, train_test_split, KFold
  from test.test_utils import metric_learners, ids_metric_learners, mock_preprocessor, tuples_learners, ids_tuples_learners, pairs_learners, ids_pairs_learners, remove_y, metric_learners_pipeline, ids_metric_learners_pipeline
label_desc: Use image node_id 1 for calling a global function with example usage: generate_array_like(input_data, labels) and returns: input_data_changed,  labels_changed