code: def test_map_groups_numpy_output_3057() -> None:
      df = pl.DataFrame(
          {
              "id": [0, 0, 0, 1, 1, 1],
              "t": [2.0, 4.3, 5, 10, 11, 14],
              "y": [0.0, 1, 1.3, 2, 3, 4],
          }
      )
  
      result = df.group_by("id", maintain_order=True).agg(
          pl.map_groups(
              ["y", "t"], lambda lst: np.trapz(y=lst[0], x=lst[1])
          ).alias("result")
      )
  
      expected = pl.DataFrame({"id": [0, 1], "result": [1.955, 13.0]})
      assert_frame_equal(result, expected)
  
file_path: polars/py-polars/tests/unit/operations/map/test_map_groups.py
imports: from __future__ import annotations
  from typing import Any, Sequence
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 7 for calling a global function with example usage: test_map_groups_numpy_output_3057() without return types