code: def from_wkt(geometry, on_invalid="raise", **kwargs):
      """
      Creates geometries from the Well-Known Text (WKT) representation.
  
      The Well-known Text format is defined in the `OGC Simple Features
      Specification for SQL <https://www.opengeospatial.org/standards/sfs>`__.
  
      Parameters
      ----------
      geometry : str or array_like
          The WKT string(s) to convert.
      on_invalid : {"raise", "warn", "ignore"}, default "raise"
          - raise: an exception will be raised if WKT input geometries are invalid.
          - warn: a warning will be raised and invalid WKT geometries will be
            returned as ``None``.
          - ignore: invalid WKT geometries will be returned as ``None`` without a warning.
      **kwargs
          See :ref:`NumPy ufunc docs <ufuncs.kwargs>` for other keyword arguments.
  
      Examples
      --------
      >>> from_wkt('POINT (0 0)')
      <POINT (0 0)>
      """
      if not np.isscalar(on_invalid):
          raise TypeError("on_invalid only accepts scalar values")
  
      invalid_handler = np.uint8(
          DecodingErrorOptions.get_value(on_invalid)
      )
  
      return lib.from_wkt(geometry, invalid_handler, **kwargs)
  
file_path: shapely/shapely/io.py
imports: import numpy
  from shapely import lib
  from shapely._enum import ParamEnum
  from shapely._ragged_array import from_ragged_array, to_ragged_array
  from shapely.decorators import requires_geos
  from shapely.errors import UnsupportedGEOSVersionError
label_desc: Use image node_id 4 for calling a global function with example usage: from_wkt(geometry, on_invalid) and returns: lib