<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clamped(self, point_or_rect):
 """ Returns the point or rectangle clamped to this rectangle. """

        if isinstance(point_or_rect, Rect):
            return Rect(np.minimum(self.mins, point_or_rect.mins),
                        np.maximum(self.maxes, point_or_rect.maxes))
        return np.clip(point_or_rect, self.mins, self.maxes)