code: def test_fillna_scalar(s, df):
      s2 = GeoSeries([Point(0, 0), None, Point(2, 2)])
  
      res = s2.fillna(Point(1, 1))
      assert_geoseries_equal(res, s)
  
      # allow np.nan although this does not change anything
      # https://github.com/geopandas/geopandas/issues/1149
      res = s2.fillna(np.nan)
      assert_geoseries_equal(res, s2)
  
      # raise exception if trying to fill missing geometry w/ non-geometry
      df2 = df.copy()
      df2["geometry"] = s2
      res = df2.fillna(Point(1, 1))
      assert_geodataframe_equal(res, df)
      with pytest.raises((NotImplementedError, TypeError)):  # GH2351
          df2.fillna(0)
  
      # allow non-geometry fill value if there are no missing values
      # https://github.com/geopandas/geopandas/issues/1149
      df3 = df.copy()
      df3.loc[0, "value1"] = np.nan
      res = df3.fillna(0)
      assert_geodataframe_equal(res.astype({"value1": "int64"}), df)
  
imports: import os
  from packaging.version import Version
  import warnings
  import numpy
  from numpy.testing import assert_array_equal
  import pandas
  import shapely
  from shapely.geometry import Point, GeometryCollection, LineString, LinearRing
  import geopandas
  from geopandas import GeoDataFrame, GeoSeries
  import geopandas._compat
  from geopandas.array import from_shapely
  from geopandas.testing import assert_geodataframe_equal, assert_geoseries_equal
  from pandas.testing import assert_frame_equal, assert_series_equal
  import pytest
label_desc: Use image node_id 22 for calling a global function with example usage: test_fillna_scalar(s, df) without return types