code: def get_chunk_n_rows(
      row_bytes, *, max_n_rows=None, working_memory=None
  ):
      """Calculate how many rows can be processed within `working_memory`.
  
      Parameters
      ----------
      row_bytes : int
          The expected number of bytes of memory that will be consumed
          during the processing of each row.
      max_n_rows : int, default=None
          The maximum return value.
      working_memory : int or float, default=None
          The number of rows to fit inside this number of MiB will be
          returned. When None (default), the value of
          ``sklearn.get_config()['working_memory']`` is used.
  
      Returns
      -------
      int
          The number of rows which can be processed within `working_memory`.
  
      Warns
      -----
      Issues a UserWarning if `row_bytes exceeds `working_memory` MiB.
      """
  
      if working_memory is None:
          working_memory = get_config()["working_memory"]
  
      chunk_n_rows = int(working_memory * (2**20) // row_bytes)
      if max_n_rows is not None:
          chunk_n_rows = min(chunk_n_rows, max_n_rows)
      if chunk_n_rows < 1:
          warnings.warn(
              "Could not adhere to working_memory config. "
              "Currently %.0fMiB, %.0fMiB required."
              % (working_memory, np.ceil(row_bytes * 2**-20))
          )
          chunk_n_rows = 1
      return chunk_n_rows
  
imports: import math
  import numbers
  import platform
  import struct
  import timeit
  import warnings
  from collections.abc import Sequence
  from contextlib import contextmanager, suppress
  from itertools import compress, islice
  import numpy
  from scipy.sparse import issparse
  from ..None import get_config
  from ..exceptions import DataConversionWarning
  from .None import _joblib, metadata_routing
  from ._bunch import Bunch
  from ._estimator_html_repr import estimator_html_repr
  from ._param_validation import Interval, validate_params
  from .class_weight import compute_class_weight, compute_sample_weight
  from .deprecation import deprecated
  from .discovery import all_estimators
  from .fixes import parse_version, threadpool_info
  from .murmurhash import murmurhash3_32
  from .validation import _is_arraylike_not_scalar, as_float_array, assert_all_finite, check_array, check_consistent_length, check_random_state, check_scalar, check_symmetric, check_X_y, column_or_1d, indexable
label_desc: Use image node_id 22 for calling a global function with example usage: get_chunk_n_rows(row_bytes) and returns: chunk_n_rows