code: def test_fill_null_minimal_upcast_4056() -> None:
      df = pl.DataFrame({"a": [-1, 2, None]})
      df = df.with_columns(pl.col("a").cast(pl.Int8))
      assert (
          df.with_columns(pl.col(pl.Int8).fill_null(-1)).dtypes[0]
          == pl.Int8
      )
      assert (
          df.with_columns(pl.col(pl.Int8).fill_null(-1000)).dtypes[0]
          == pl.Int32
      )
  
imports: from __future__ import annotations
  from collections import OrderedDict
  from datetime import date, timedelta
  from typing import Any, Iterator, Mapping
  import pytest
  import polars
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 3 for calling a global function with example usage: test_fill_null_minimal_upcast_4056() without return types