code: def test_indexing(s, df):
      # accessing scalar from the geometry (column)
      exp = Point(1, 1)
      assert s[1] == exp
      assert s.loc[1] == exp
      assert s.iloc[1] == exp
      assert df.loc[1, "geometry"] == exp
      assert df.iloc[1, 0] == exp
  
      # multiple values
      exp = GeoSeries([Point(2, 2), Point(0, 0)], index=[2, 0])
      assert_geoseries_equal(s.loc[[2, 0]], exp)
      assert_geoseries_equal(s.iloc[[2, 0]], exp)
      assert_geoseries_equal(s.reindex([2, 0]), exp)
      assert_geoseries_equal(df.loc[[2, 0], "geometry"], exp)
      # TODO here iloc does not return a GeoSeries
      assert_series_equal(
          df.iloc[[2, 0], 0],
          exp,
          check_series_type=False,
          check_names=False,
      )
  
      # boolean indexing
      exp = GeoSeries([Point(0, 0), Point(2, 2)], index=[0, 2])
      mask = np.array([True, False, True])
      assert_geoseries_equal(s[mask], exp)
      assert_geoseries_equal(s.loc[mask], exp)
      assert_geoseries_equal(df[mask]["geometry"], exp)
      assert_geoseries_equal(df.loc[mask, "geometry"], exp)
  
      # slices
      s.index = [1, 2, 3]
      exp = GeoSeries([Point(1, 1), Point(2, 2)], index=[2, 3])
      assert_series_equal(s[1:], exp)
      assert_series_equal(s.iloc[1:], exp)
      assert_series_equal(s.loc[2:], 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 8 for calling a global function with example usage: test_indexing(s, df) without return types