code: def test_build_division_map(batch_size, n_sub):
      """Test the helper that builds a map of the new sub-batch and position
      in this batch of each series in a divided batch
      """
      # Generate the id tracker
      # Note: in the real use case the individual id arrays are sorted but the
      # helper function doesn't require that
      tracker_np = np.array_split(
          np.random.permutation(batch_size), n_sub
      )
      tracker = [
          input_to_cuml_array(tr, convert_to_dtype=np.int32)[0]
          for tr in tracker_np
      ]
  
      # Call the tested function
      id_to_model, id_to_pos = auto_arima._build_division_map(
          tracker, batch_size
      )
  
      # Compute the expected results in pure Python
      id_to_model_ref, id_to_pos_ref = _build_division_map_ref(
          tracker_np, batch_size, n_sub
      )
  
      # Compare the results
      np.testing.assert_array_equal(
          id_to_model.to_output("numpy"), id_to_model_ref
      )
      np.testing.assert_array_equal(
          id_to_pos.to_output("numpy"), id_to_pos_ref
      )
  
file_path: cuml/python/cuml/tests/test_auto_arima.py
imports: from cuml.internals.input_utils import input_to_cuml_array
  from cuml.tsa import auto_arima
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
label_desc: Use image node_id 4 for calling a global function with example usage: test_build_division_map(batch_size, n_sub) without return types