code: def _from_pointer(pointer, incref):
          
          if pointer == ffi.NULL:
              raise ValueError('Null pointer')
          if incref:
              cairo.cairo_pattern_reference(pointer)
          self = object.__new__(PATTERN_TYPE_TO_CLASS.get(
              cairo.cairo_pattern_get_type(pointer), Pattern))
          Pattern.__init__(self, pointer)  # Skip the subclass’s __init__
          return self
docs: Wrap an existing :c:type:`cairo_pattern_t *` cdata pointer.
  
          :type incref: bool
          :param incref:
              Whether increase the :ref:`reference count <refcounting>` now.
          :return:
              A new instance of :class:`Pattern` or one of its sub-classes,
              depending on the pattern’s type.