code: def get_dimensions(geometry, **kwargs):
      """Returns the inherent dimensionality of a geometry.
  
      The inherent dimension is 0 for points, 1 for linestrings and linearrings,
      and 2 for polygons. For geometrycollections it is the max of the containing
      elements. Empty collections and None values return -1.
  
      Parameters
      ----------
      geometry : Geometry or array_like
      **kwargs
          See :ref:`NumPy ufunc docs <ufuncs.kwargs>` for other keyword arguments.
  
      Examples
      --------
      >>> from shapely import GeometryCollection, Point, Polygon
      >>> point = Point(0, 0)
      >>> get_dimensions(point)
      0
      >>> polygon = Polygon([(0, 0), (0, 10), (10, 10), (10, 0), (0, 0)])
      >>> get_dimensions(polygon)
      2
      >>> get_dimensions(GeometryCollection([point, polygon]))
      2
      >>> get_dimensions(GeometryCollection([]))
      -1
      >>> get_dimensions(None)
      -1
      """
      return lib.get_dimensions(geometry, **kwargs)
  
imports: import warnings
  from enum import IntEnum
  import numpy
  from shapely import _geometry_helpers, geos_version, lib
  from shapely._enum import ParamEnum
  from shapely.decorators import multithreading_enabled
label_desc: Use image node_id 2 for calling a global function with example usage: get_dimensions(geometry) and returns: lib