docs: def from_buffer(obj):
      """Return ``(pointer_address, length_in_bytes)`` for a buffer object."""
      if hasattr(obj, 'buffer_info'):
          # Looks like a array.array object.
          address, length = obj.buffer_info()
          return address, length * obj.itemsize
      else:
          # Other buffers.
          # XXX Unfortunately ctypes.c_char.from_buffer
          # does not have length information,
          # and we’re not sure that len(obj) is measured in bytes.
          # (It’s not for array.array, though that is taken care of.)
          return ctypes.addressof(ctypes.c_char.from_buffer(obj)), len(obj)