code: def __init__(self, Klass, nfields, *, use_array=None):
      self._Klass = Klass
      self._nfields = nfields
      self._capa = -1
  
      self.use_sip_array = False
      self.use_ptr_to_array = False
  
      if QT_LIB.startswith("PyQt"):
          if use_array is None:
              use_array = hasattr(sip, "array") and (
                  (0x60301 <= QtCore.PYQT_VERSION)
                  or (0x50F07 <= QtCore.PYQT_VERSION < 0x60000)
              )
          self.use_sip_array = use_array
  
      if QT_LIB.startswith("PySide"):
          if use_array is None:
              use_array = (
                  Klass is QtGui.QPainter.PixmapFragment
                  or pyside_version_info >= (6, 4, 3)
              )
          self.use_ptr_to_array = use_array
  
      self.resize(0)
  
imports: import ctypes
  import itertools
  import numpy
  from .None import QT_LIB, QtCore, QtGui, compat
label_desc: Use image node_id 1 to create a new PrimitiveArray object  with example: obj = PrimitiveArray(Klass, nfields)