code: def test_no_panic_on_nan_3067() -> None:
      df = pl.DataFrame(
          {
              "group": ["a", "a", "a", "b", "b", "b"],
              "total": [1.0, 2, 3, 4, 5, np.nan],
          }
      )
  
      expected = [None, 1.0, 2.0, None, 4.0, 5.0]
      assert (
          df.select([pl.col("total").shift().over("group")])[
              "total"
          ].to_list()
          == expected
      )
  
imports: from __future__ import annotations
  import numpy
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 6 for calling a global function with example usage: test_no_panic_on_nan_3067() without return types