code: def test_merge_geo(self):
      # First check that we gets hits from the boros frame.
      tree = self.boros.sindex
      hits = tree.intersection((1012821.80, 229228.26))
      res = [self.boros.iloc[hit]["BoroName"] for hit in hits]
      assert res == ["Bronx", "Queens"]
  
      # Check that we only get the Bronx from this view.
      first = self.boros[self.boros["BoroCode"] < 3]
      tree = first.sindex
      hits = tree.intersection((1012821.80, 229228.26))
      res = [first.iloc[hit]["BoroName"] for hit in hits]
      assert res == ["Bronx"]
  
      # Check that we only get Queens from this view.
      second = self.boros[self.boros["BoroCode"] >= 3]
      tree = second.sindex
      hits = tree.intersection((1012821.80, 229228.26))
      res = ([second.iloc[hit]["BoroName"] for hit in hits],)
      assert res == ["Queens"]
  
      # Get both the Bronx and Queens again.
      merged = first.merge(second, how="outer")
      assert len(merged) == 5
      assert merged.sindex.size == 5
      tree = merged.sindex
      hits = tree.intersection((1012821.80, 229228.26))
      res = [merged.iloc[hit]["BoroName"] for hit in hits]
      assert res == ["Bronx", "Queens"]
  
imports: from math import sqrt
  import numpy
  import pandas
  import pytest
  import shapely
  from numpy.testing import assert_array_equal
  from shapely.geometry import GeometryCollection, LineString, MultiPolygon, Point, Polygon, box
  import geopandas
  from geopandas import GeoDataFrame, GeoSeries, read_file
  from geopandas import _compat
label_desc: Use image node_id 2 for calling the TestJoinSindex obj's underlying member method code with example usage: obj.test_merge_geo() without return types