code: def centroid(geometry, **kwargs):
      """Computes the geometric center (center-of-mass) of a geometry.
  
      For multipoints this is computed as the mean of the input coordinates.
      For multilinestrings the centroid is weighted by the length of each
      line segment. For multipolygons the centroid is weighted by the area of
      each polygon.
  
      Parameters
      ----------
      geometry : Geometry or array_like
      **kwargs
          See :ref:`NumPy ufunc docs <ufuncs.kwargs>` for other keyword arguments.
  
      Examples
      --------
      >>> from shapely import LineString, MultiPoint, Polygon
      >>> centroid(Polygon([(0, 0), (10, 0), (10, 10), (0, 10), (0, 0)]))
      <POINT (5 5)>
      >>> centroid(LineString([(0, 0), (2, 2), (10, 10)]))
      <POINT (5 5)>
      >>> centroid(MultiPoint([(0, 0), (10, 10)]))
      <POINT (5 5)>
      >>> centroid(Polygon())
      <POINT EMPTY>
      """
      return lib.centroid(geometry, **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 4 for calling a global function with example usage: centroid(geometry) and returns: lib