<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _fw_create(self, drvr_name, data, cache):
 """Firewall create routine. This function updates its local cache with FW parameters. It checks if local cache has information about the Policy associated with the FW. If not, it means a restart has happened. It retrieves the policy associated with the FW by calling Openstack API's and calls t he policy create internal routine. """


        fw = data.get('firewall')
        tenant_id = fw.get('tenant_id')
        fw_name = fw.get('name')
        fw_id = fw.get('id')
        fw_pol_id = fw.get('firewall_policy_id')
        admin_state = fw.get('admin_state_up')
        rtr_id = None
        if 'router_ids' in fw and len(fw.get('router_ids')) != 0:
            rtr_id = fw.get('router_ids')[0]
        if not admin_state:
            LOG.debug("Admin state disabled")
            return

        name = dfa_dbm.DfaDBMixin.get_project_name(self, tenant_id)
        rtr_name = '_'.join([fw_constants.TENANT_EDGE_RTR, name])

        fw_rtr_name = self.os_helper.get_rtr_name(rtr_id)
        fw_type = None
        if fw_rtr_name == rtr_name:
            fw_type = fw_constants.FW_TENANT_EDGE
        if tenant_id not in self.fwid_attr:
            self.fwid_attr[tenant_id] = FwMapAttr(tenant_id)
        tenant_obj = self.fwid_attr[tenant_id]
        tenant_obj.create_fw(name, fw_pol_id, fw_id, fw_name, fw_type, rtr_id)
        self.tenant_db.store_fw_tenant(fw_id, tenant_id)
        if not cache:
            self._check_create_fw(tenant_id, drvr_name)
        if fw_pol_id is not None and not (
                tenant_obj.is_policy_present(fw_pol_id)):
            pol_data = self.os_helper.get_fw_policy(fw_pol_id)
            if pol_data is not None:
                self.fw_policy_create(pol_data, cache=cache)