<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def target_in_range(self, target: "Unit", bonus_distance: Union[int, float] = 0) -> bool: """ Includes the target's radius when calculating distance to target """

        if self.can_attack_ground and not target.is_flying:
            unit_attack_range = self.ground_range
        elif self.can_attack_air and (target.is_flying or target.type_id == UnitTypeId.COLOSSUS):
            unit_attack_range = self.air_range
        else:
            unit_attack_range = -1
        return (
            self.position._distance_squared(target.position)
            <= (self.radius + target.radius + unit_attack_range - bonus_distance) ** 2
        )