class_docstr: Representation of a rectangular area in a 2D coordinate system.
  
  Parameters
  ----------
  *args : arguments
      Can be in the form `Rect(x, y, w, h)`, `Rect(pos, size)`, or
      `Rect(Rect)`.
code: def __init__(self, *args, **kwargs):
      self._pos = (0, 0)
      self._size = (0, 0)
  
      if len(args) == 1 and isinstance(args[0], Rect):
          self._pos = args[0]._pos[:]
          self._size = args[0]._size[:]
      elif (
          len(args) == 1
          and isinstance(args[0], (list, tuple))
          and len(args[0]) == 4
      ):
          self._pos = args[0][:2]
          self._size = args[0][2:]
      elif len(args) == 2:
          self._pos = tuple(args[0])
          self._size = tuple(args[1])
      elif len(args) == 4:
          self._pos = tuple(args[:2])
          self._size = tuple(args[2:])
      elif len(args) != 0:
          raise TypeError(
              "Rect must be instantiated with 0, 1, 2, or 4 "
              "non-keyword arguments."
          )
  
      self._pos = kwargs.get("pos", self._pos)
      self._size = kwargs.get("size", self._size)
  
      if len(self._pos) != 2 or len(self._size) != 2:
          raise ValueError(
              "Rect pos and size arguments must have 2 " "elements."
          )
  
imports: import numpy
label_desc: Use image node_id 1 to create a new Rect object from inherited base classes: object with example: obj = Rect()