<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _create_fw_fab_dev_te(self, tenant_id, drvr_name, fw_dict):
 """Prepares the Fabric and configures the device. This routine calls the fabric class to prepare the fabric when a firewall is created. It also calls the device manager to configure the device. It updates the database with the final result. """

        is_fw_virt = self.is_device_virtual()
        ret = self.fabric.prepare_fabric_fw(tenant_id, fw_dict, is_fw_virt,
                                            fw_constants.RESULT_FW_CREATE_INIT)

        if not ret:
            LOG.error("Prepare Fabric failed")
            return
        else:
            self.update_fw_db_final_result(fw_dict.get('fw_id'), (
                fw_constants.RESULT_FW_CREATE_DONE))
        ret = self.create_fw_device(tenant_id, fw_dict.get('fw_id'),
                                    fw_dict)
        if ret:
            self.fwid_attr[tenant_id].fw_drvr_created(True)
            self.update_fw_db_dev_status(fw_dict.get('fw_id'), 'SUCCESS')
            LOG.info("FW device create returned success for tenant %s",
                     tenant_id)
        else:
            LOG.error("FW device create returned failure for tenant %s",
                      tenant_id)