code: def relate_pattern(a, b, pattern, **kwargs):
      """
      Returns True if the DE-9IM string code for the relationship between
      the geometries satisfies the pattern, else False.
  
      This function compares the DE-9IM code string for two geometries
      against a specified pattern. If the string matches the pattern then
      ``True`` is returned, otherwise ``False``. The pattern specified can
      be an exact match (``0``, ``1`` or ``2``), a boolean match
      (uppercase ``T`` or ``F``), or a wildcard (``*``). For example,
      the pattern for the ``within`` predicate is ``'T*F**F***'``.
  
      Parameters
      ----------
      a, b : Geometry or array_like
      pattern : string
      **kwargs
          See :ref:`NumPy ufunc docs <ufuncs.kwargs>` for other keyword arguments.
  
      Examples
      --------
      >>> from shapely import Point, Polygon
      >>> point = Point(0.5, 0.5)
      >>> square = Polygon([(0, 0), (0, 1), (1, 1), (1, 0), (0, 0)])
      >>> relate(point, square)
      '0FFFFF212'
      >>> relate_pattern(point, square, "T*F**F***")
      True
      """
      return lib.relate_pattern(a, b, pattern, **kwargs)
  
imports: import warnings
  import numpy
  from shapely import lib
  from shapely.decorators import multithreading_enabled, requires_geos
label_desc: Use image node_id 26 for calling a global function with example usage: relate_pattern(a, b, pattern) and returns: lib