<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_order_template(self, quote_id, extra, quantity=1):
 """Generate a complete order template. :param int quote_id: ID of target quote :param dictionary extra: Overrides for the defaults of SoftLayer_Container_Product_Order :param int quantity: Number of items to order. """


        if not isinstance(extra, dict):
            raise ValueError("extra is not formatted properly")

        container = self.get_order_container(quote_id)

        container['quantity'] = quantity
        for key in extra.keys():
            container[key] = extra[key]

        return container