def collision(object1, object2):
    """detect collision between two objects using circles

    Tests for collision between two objects by testing whether two circles
    centered on the objects overlap. Objects must have a
    a "radius" attribute, which is used to create the circle.

    Args:
        object1: First object for collision detection
        object2: Second object for collision detection

    Returns:
        bool: True if objects' circles (defined by their radius) overlap
    """

    x_distance = object1.x - object2.x
    y_distance = object1.y - object2.y
    distance_squared = x_distance ** 2 + y_distance ** 2

    try:
        return distance_squared <= \
               (object1.fire_radius + object2.fire_radius) ** 2
    except AttributeError:
        return distance_squared <= (object1.radius + object2.radius) ** 2