code: def test_safe_indexing_2d_container_axis_1(
      array_type, indices_type, indices
  ):
      # validation of the indices
      # we make a copy because indices is mutable and shared between tests
      indices_converted = copy(indices)
      if indices_type == "slice" and isinstance(indices[1], int):
          indices_converted[1] += 1
  
      columns_name = ["col_0", "col_1", "col_2"]
      array = _convert_container(
          [[1, 2, 3], [4, 5, 6], [7, 8, 9]], array_type, columns_name
      )
      indices_converted = _convert_container(
          indices_converted, indices_type
      )
  
      if isinstance(indices[0], str) and array_type != "dataframe":
          err_msg = "Specifying the columns using strings is only supported for dataframes"
          with pytest.raises(ValueError, match=err_msg):
              _safe_indexing(array, indices_converted, axis=1)
      else:
          subset = _safe_indexing(array, indices_converted, axis=1)
          assert_allclose_dense_sparse(
              subset,
              _convert_container([[2, 3], [5, 6], [8, 9]], array_type),
          )
  
imports: import string
  import timeit
  import warnings
  from copy import copy
  from itertools import chain
  import numpy
  import pytest
  from sklearn import config_context
  from sklearn.utils import _approximate_mode, _determine_key_type, _get_column_indices, _is_polars_df, _message_with_time, _print_elapsed_time, _safe_assign, _safe_indexing, _to_object_array, check_random_state, column_or_1d, deprecated, gen_even_slices, get_chunk_n_rows, is_scalar_nan, resample, safe_mask, shuffle
  from sklearn.utils._mocking import MockDataFrame
  from sklearn.utils._testing import _convert_container, assert_allclose_dense_sparse, assert_array_equal, assert_no_warnings
  from sklearn.utils.fixes import CSC_CONTAINERS, CSR_CONTAINERS
label_desc: Use image node_id 15 for calling a global function with example usage: test_safe_indexing_2d_container_axis_1(array_type, indices_type, indices) without return types