code: def draw_rect(
          self,
          x: int,
          y: int,
          width: int,
          height: int,
          ch: int,
          fg: Optional[Tuple[int, int, int]] = None,
          bg: Optional[Tuple[int, int, int]] = None,
          bg_blend: int = tcod.constants.BKGND_SET,
      ) -> None:
          
          x, y = self._pythonic_index(x, y)
          lib.draw_rect(
              self.console_c,
              x,
              y,
              width,
              height,
              ch,
              (fg,) if fg is not None else ffi.NULL,
              (bg,) if bg is not None else ffi.NULL,
              bg_blend,
          )
docs: Draw characters and colors over a rectangular region.
  
          `x` and `y` are the starting tile, with ``0,0`` as the upper-left
          corner of the console.  You can use negative numbers if you want to
          start printing relative to the bottom-right corner, but this behavior
          may change in future versions.
  
          `width` and `height` determine the size of the rectangle.
  
          `ch` is a Unicode integer.  You can use 0 to leave the current
          characters unchanged.
  
          `fg` and `bg` are the foreground text color and background tile color
          respectfully.  This is a 3-item tuple with (r, g, b) color values from
          0 to 255.  These parameters can also be set to `None` to leave the
          colors unchanged.
  
          `bg_blend` is the blend type used by libtcod.
  
          .. versionadded:: 8.5
  
          .. versionchanged:: 9.0
              `fg` and `bg` now default to `None` instead of white-on-black.