<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_device(self, tenant_id, fw_id, data):
 """Creates the Firewall. """

        drvr_dict, mgmt_ip = self.sched_obj.allocate_fw_dev(fw_id)
        if drvr_dict is not None and mgmt_ip is not None:
            self.update_fw_db_mgmt_ip(fw_id, mgmt_ip)
            ret = drvr_dict.get('drvr_obj').create_fw(tenant_id, data)
            if not ret:
                self.sched_obj.deallocate_fw_dev(fw_id)
            return ret
        else:
            return False