code: def _overlay_difference(df1, df2):
      """
      Overlay Difference operation used in overlay function
      """
      # spatial index query to find intersections
      idx1, idx2 = df2.sindex.query(
          df1.geometry, predicate="intersects", sort=True
      )
      idx1_unique, idx1_unique_indices = np.unique(
          idx1, return_index=True
      )
      idx2_split = np.split(idx2, idx1_unique_indices[1:])
      sidx = [
          idx2_split.pop(0) if idx in idx1_unique else []
          for idx in range(df1.geometry.size)
      ]
      # Create differences
      new_g = []
      for geom, neighbours in zip(df1.geometry, sidx):
          new = reduce(
              lambda x, y: x.difference(y),
              [geom] + list(df2.geometry.iloc[neighbours]),
          )
          new_g.append(new)
      differences = GeoSeries(new_g, index=df1.index, crs=df1.crs)
      poly_ix = differences.geom_type.isin(["Polygon", "MultiPolygon"])
      differences.loc[poly_ix] = differences[poly_ix].make_valid()
      geom_diff = differences[~differences.is_empty].copy()
      dfdiff = df1[~differences.is_empty].copy()
      dfdiff[dfdiff._geometry_column_name] = geom_diff
      return dfdiff
  
file_path: geopandas/geopandas/tools/overlay.py
imports: import warnings
  from functools import reduce
  import numpy
  import pandas
  from geopandas import GeoDataFrame, GeoSeries
  from geopandas.array import _check_crs, _crs_mismatch_warn
label_desc: Use image node_id 3 for calling a global function with example usage: _overlay_difference(df1, df2) and returns: dfdiff