<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_fabric_fw_internal(self, tenant_id, fw_dict, is_fw_virt, result):
 """Internal routine to delete the fabric configuration. This runs the SM and deletes the entries from DB and local cache. """

        if not self.auto_nwk_create:
            LOG.info("Auto network creation disabled")
            return False
        try:
            tenant_name = fw_dict.get('tenant_name')
            fw_name = fw_dict.get('fw_name')
            if tenant_id not in self.service_attr:
                LOG.error("Service obj not created for tenant %s",
                          tenant_name)
                return False
            # A check for is_fabric_create is not needed since a delete
            # may be issued even when create is not completely done.
            # For example, some state such as create stuff in DCNM failed and
            # SM for create is in the process of retrying. A delete can be
            # issue at that time. If we have a check for is_fabric_create
            # then delete operation will not go through.
            if result == fw_const.RESULT_FW_DELETE_DONE:
                LOG.error("Fabric for tenant %s already deleted",
                          tenant_id)
                return True
            ret = self.run_delete_sm(tenant_id, fw_dict, is_fw_virt)
            self.service_attr[tenant_id].set_fabric_create(False)
            if ret:
                LOG.info("Delete SM completed successfully for tenant"
                         "%(tenant)s FW %(fw)s",
                         {'tenant': tenant_name, 'fw': fw_name})
                self.service_attr[tenant_id].destroy_local_fw_db()
                self.delete_serv_obj(tenant_id)
            else:
                LOG.error("Delete SM failed for tenant"
                          "%(tenant)s FW %(fw)s",
                          {'tenant': tenant_name, 'fw': fw_name})
            # TODO(padkrish) Equivalent of create_fw_db for delete.
        except Exception as exc:
            LOG.error("Exception raised in delete fabric int %s",
                      str(exc))
            return False
        return ret