def test_check_data_stays_on_gpu(toy_weather_data) -> None:
    """Perform some operations and check the data stays on the GPU."""
    freeze = (toy_weather_data["tmin"] <= 0).groupby("time.month").mean("time")
    assert isinstance(freeze.data, cp.ndarray)
Perform some operations and check the data stays on the GPU.
xarray/tests/test_cupy.py