code: def test_cascaded_union(self):
      # cascaded_union is deprecated, as it was superseded by unary_union
  
      # Use a partial function to make 100 points uniformly distributed
      # in a 40x40 box centered on 0,0.
  
      r = partial(random.uniform, -20.0, 20.0)
      points = [Point(r(), r()) for i in range(100)]
  
      # Buffer the points, producing 100 polygon spots
      spots = [p.buffer(2.5) for p in points]
  
      # Perform a cascaded union of the polygon spots, dissolving them
      # into a collection of polygon patches
      with pytest.warns(
          ShapelyDeprecationWarning, match="is deprecated"
      ):
          u = cascaded_union(spots)
      assert u.geom_type in ("Polygon", "MultiPolygon")
  
file_path: shapely/shapely/tests/legacy/test_union.py
imports: import random
  import unittest
  from functools import partial
  from itertools import islice
  import pytest
  from shapely.errors import ShapelyDeprecationWarning
  from shapely.geometry import MultiPolygon, Point
  from shapely.ops import cascaded_union, unary_union
label_desc: Use image node_id 1 for calling the UnionTestCase obj's underlying member method code with example usage: obj.test_cascaded_union() without return types