def _draw_bbox_pil(canvas, bbox, color, stroke):
  """Draws BBox onto PIL.ImageDraw
  :param bbox: BBoxDiim
  :param color: Color
  :param stroke: int
  :returns PIL.ImageDraw
  """
  xyxy = bbox.xyxy_int
  if stroke == -1:
    canvas.rectangle(xyxy, fill=color.rgb_int)
  else:
    canvas.rectangle(xyxy, outline=color.rgb_int, width=stroke)
  return canvas