code: def test_map_return_py_object() -> None:
      df = pl.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]})
  
      result = df.select(
          [
              pl.all().map_batches(
                  lambda s: reduce(lambda a, b: a + b, s)
              )
          ]
      )
  
      expected = pl.DataFrame({"A": [6], "B": [15]})
      assert_frame_equal(result, expected)
  
file_path: polars/py-polars/tests/unit/operations/map/test_map_batches.py
imports: from __future__ import annotations
  from functools import reduce
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 1 for calling a global function with example usage: test_map_return_py_object() without return types