code: def target_in_range(self, target: "Unit", bonus_distance: Union[int, float] = 0) -> bool:
          
          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
          )
docs: Includes the target's radius when calculating distance to target