code: def test_map_elements_arithmetic_consistency() -> None:
      df = pl.DataFrame({"A": ["a", "a"], "B": [2, 3]})
      with pytest.warns(
          PolarsInefficientMapWarning, match="with this one instead"
      ):
          assert df.group_by("A").agg(
              pl.col("B").map_elements(lambda x: x + 1.0)
          )["B"].to_list() == [[3.0, 4.0]]
  
imports: from __future__ import annotations
  import json
  from datetime import date, datetime, timedelta
  import numpy
  import pytest
  import polars
  from polars.exceptions import PolarsInefficientMapWarning
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_map_elements_arithmetic_consistency() without return types