code: def segmentize(geometry, max_segment_length, **kwargs):
      """Adds vertices to line segments based on maximum segment length.
  
      Additional vertices will be added to every line segment in an input geometry
      so that segments are no longer than the provided maximum segment length. New
      vertices will evenly subdivide each segment.
  
      Only linear components of input geometries are densified; other geometries
      are returned unmodified.
  
      Parameters
      ----------
      geometry : Geometry or array_like
      max_segment_length : float or array_like
          Additional vertices will be added so that all line segments are no
          longer than this value.  Must be greater than 0.
      **kwargs
          See :ref:`NumPy ufunc docs <ufuncs.kwargs>` for other keyword arguments.
  
      Examples
      --------
      >>> from shapely import LineString, Polygon
      >>> line = LineString([(0, 0), (0, 10)])
      >>> segmentize(line, max_segment_length=5)
      <LINESTRING (0 0, 0 5, 0 10)>
      >>> polygon = Polygon([(0, 0), (10, 0), (10, 10), (0, 10), (0, 0)])
      >>> segmentize(polygon, max_segment_length=5)
      <POLYGON ((0 0, 5 0, 10 0, 10 5, 10 10, 5 10, 0 10, 0 5, 0 0))>
      >>> segmentize(None, max_segment_length=5) is None
      True
      """
      return lib.segmentize(geometry, max_segment_length, **kwargs)
  
imports: import numpy
  from shapely import lib
  from shapely._enum import ParamEnum
  from shapely.algorithms._oriented_envelope import _oriented_envelope_min_area
  from shapely.decorators import multithreading_enabled, requires_geos
label_desc: Use image node_id 20 for calling a global function with example usage: segmentize(geometry, max_segment_length) and returns: lib