code: def test_get_chunk_n_rows_warns():
      """Check that warning is raised when working_memory is too low."""
      row_bytes = 1024 * 1024 + 1
      max_n_rows = None
      working_memory = 1
      expected = 1
  
      warn_msg = "Could not adhere to working_memory config. Currently 1MiB, 2MiB required."
      with pytest.warns(UserWarning, match=warn_msg):
          actual = get_chunk_n_rows(
              row_bytes=row_bytes,
              max_n_rows=max_n_rows,
              working_memory=working_memory,
          )
  
      assert actual == expected
      assert type(actual) is type(expected)
  
      with config_context(working_memory=working_memory):
          with pytest.warns(UserWarning, match=warn_msg):
              actual = get_chunk_n_rows(
                  row_bytes=row_bytes, max_n_rows=max_n_rows
              )
          assert actual == expected
          assert type(actual) is type(expected)
  
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 34 for calling a global function with example usage: test_get_chunk_n_rows_warns() without return types