<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_rect(img, box, color=None, thickness=1):
 """ Draws a bounding box inside the image. :param img: Input image :param box: Box object that defines the bounding box. :param color: Color of the box :param thickness: Thickness of line :return: Rectangle added image """

    if color is None:
        color = COL_GRAY

    box = box.to_int()
    cv.rectangle(img, box.top_left(), box.bottom_right(), color, thickness)