code: def test_join_with_empty(self, predicate, empty):
      # Check joins with empty geometry columns/dataframes.
      polygons = geopandas.GeoDataFrame(
          {
              "col2": [1, 2],
              "geometry": [
                  Polygon([(0, 0), (1, 0), (1, 1), (0, 1)]),
                  Polygon([(1, 0), (2, 0), (2, 1), (1, 1)]),
              ],
          }
      )
      result = sjoin(empty, polygons, how="left", predicate=predicate)
      assert result.index_right.isnull().all()
      result = sjoin(empty, polygons, how="right", predicate=predicate)
      assert result.index_left.isnull().all()
      result = sjoin(empty, polygons, how="inner", predicate=predicate)
      assert result.empty
  
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 9 for calling the TestSpatialJoin obj's underlying member method code with example usage: obj.test_join_with_empty(predicate, empty) without return types