def closest_distance_to(self, position: Union[Unit, Point2, Point3]) -> Union[int, float]:
        """ Returns the distance between the closest unit from this group to the target unit """
        assert self.exists
        if isinstance(position, Unit):
            position = position.position
        return position.distance_to_closest(
            [u.position for u in self]
        )
def closest_distance_to ( self , position : Union [ Unit , Point2 , Point3 ] ) -> Union [ int , float ] : assert self . exists if isinstance ( position , Unit ) : position = position . position return position . distance_to_closest ( [ u . position for u in self ] )
Returns the distance between the closest unit from this group to the target unit