code: def dfs(request):
      polys1 = GeoSeries(
          [
              Polygon([(0, 0), (5, 0), (5, 5), (0, 5)]),
              Polygon([(5, 5), (6, 5), (6, 6), (5, 6)]),
              Polygon([(6, 0), (9, 0), (9, 3), (6, 3)]),
          ]
      )
  
      polys2 = GeoSeries(
          [
              Polygon([(1, 1), (4, 1), (4, 4), (1, 4)]),
              Polygon([(4, 4), (7, 4), (7, 7), (4, 7)]),
              Polygon([(7, 7), (10, 7), (10, 10), (7, 10)]),
          ]
      )
  
      df1 = GeoDataFrame({"geometry": polys1, "df1": [0, 1, 2]})
      df2 = GeoDataFrame({"geometry": polys2, "df2": [3, 4, 5]})
  
      if request.param == "string-index":
          df1.index = ["a", "b", "c"]
          df2.index = ["d", "e", "f"]
  
      if request.param == "named-index":
          df1.index.name = "df1_ix"
          df2.index.name = "df2_ix"
  
      if request.param == "multi-index":
          i1 = ["a", "b", "c"]
          i2 = ["d", "e", "f"]
          df1 = df1.set_index([i1, i2])
          df2 = df2.set_index([i2, i1])
  
      if request.param == "named-multi-index":
          i1 = ["a", "b", "c"]
          i2 = ["d", "e", "f"]
          df1 = df1.set_index([i1, i2])
          df2 = df2.set_index([i2, i1])
          df1.index.names = ["df1_ix1", "df1_ix2"]
          df2.index.names = ["df2_ix1", "df2_ix2"]
  
      # construction expected frames
      expected = {}
  
      part1 = (
          df1.copy()
          .reset_index()
          .rename(columns={"index": "index_left"})
      )
      part2 = (
          df2.copy()
          .iloc[[0, 1, 1, 2]]
          .reset_index()
          .rename(columns={"index": "index_right"})
      )
      part1["_merge"] = [0, 1, 2]
      part2["_merge"] = [0, 0, 1, 3]
      exp = pd.merge(part1, part2, on="_merge", how="outer")
      expected["intersects"] = exp.drop("_merge", axis=1).copy()
  
      part1 = (
          df1.copy()
          .reset_index()
          .rename(columns={"index": "index_left"})
      )
      part2 = (
          df2.copy()
          .reset_index()
          .rename(columns={"index": "index_right"})
      )
      part1["_merge"] = [0, 1, 2]
      part2["_merge"] = [0, 3, 3]
      exp = pd.merge(part1, part2, on="_merge", how="outer")
      expected["contains"] = exp.drop("_merge", axis=1).copy()
  
      part1["_merge"] = [0, 1, 2]
      part2["_merge"] = [3, 1, 3]
      exp = pd.merge(part1, part2, on="_merge", how="outer")
      expected["within"] = exp.drop("_merge", axis=1).copy()
  
      return [request.param, df1, df2, expected]
  
imports: import math
  from typing import Sequence
  import numpy
  import pandas
  import shapely
  from shapely.geometry import Point, Polygon, GeometryCollection
  import geopandas
  import geopandas._compat
  from geopandas import GeoDataFrame, GeoSeries, read_file, sjoin, sjoin_nearest
  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 1 for calling a global function with example usage: dfs(request) and returns: list