code: def test_numerical_operations(s, df):
      # df methods ignore the geometry column
      exp = pd.Series([3, 4], index=["value1", "value2"])
      if not compat.PANDAS_GE_20:
          res = df.sum()
      else:
          res = df.sum(numeric_only=True)
      assert_series_equal(res, exp)
  
      # series methods raise error (not supported for geometry)
      with pytest.raises(TypeError):
          s.sum()
  
      with pytest.raises(TypeError):
          s.max()
  
      with pytest.raises((TypeError, ValueError)):
          # TODO: remove ValueError after pandas-dev/pandas#32749
          s.idxmax()
  
      # numerical ops raise an error
      with pytest.raises(TypeError):
          df + 1
  
      with pytest.raises(TypeError):
          s + 1
  
      # boolean comparisons work
      res = df == 100
      exp = pd.DataFrame(False, index=df.index, columns=df.columns)
      assert_frame_equal(res, exp)
  
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 18 for calling a global function with example usage: test_numerical_operations(s, df) without return types