def format_result(house):
    """
    Formats the result from the house object into the template

    :param house: An instance of the House object
    :return: A string containing the formatted template with data
    """

    # Getting the raw data i.e. elements retrieved from the CAD website
    # this is to double check the decks, porch, patio etc
    raw_data = ""
    for k, v in house.elements:
        raw_data += f'{k}: {v}\n'

    template = f"""
{house.address}

STORY      : {house.stories}
YEAR BUILT : {house.year_built}
ROOF REPL  : 
SQ FOOT    : {house.sqft}
BATHROOMS  : {house.baths}
GARAGE     : {house.garage}
FIREPLACE  : {house.fireplace}
OPEN PORCH : {house.porch}
PATIO      : {house.patio}
WINDOW     : 
DOGS       : 
PAY        : 
EXTERIOR   : 
BOUGHT     : {house.purchase_date}
MARKET VAL : {house.value}
FLOOD QUOTE: 

Raw Data:
Owner: {house.buyer}
{raw_data}
"""
    return template