code: def _remove_internal_nw_nat_rules(self, ri, ports, ext_port,
                                        intf_deleted=False):
          
          acls = []
          # first disable nat in all inner ports
          for port in ports:
              in_itfc_name = self._get_interface_name_from_hosting_port(port)
              acls.append(self._generate_acl_num_from_port(port))
              is_alone = len(port['change_details']['current_ports']) == 1
              if not intf_deleted and is_alone is True:
                  self._remove_interface_nat(in_itfc_name, 'inside')
          # There is a possibility that the dynamic NAT rule cannot be removed
          # from the running config, if there is still traffic in the inner
          # interface causing a rule to be present in the NAT translation
          # table. For this we give 2 seconds for the 'inside NAT rule' to
          # expire and then clear the NAT translation table manually. This can
          # be costly and hence is not enabled here, pending further
          # sinvestigation.
  
          # LOG.debug("Sleep for 2 seconds before clearing NAT rules")
          # time.sleep(2)
          # clear the NAT translation table
          # self._remove_dyn_nat_translations()
  
          # remove dynamic nat rules and acls
          vrf_name = self._get_vrf_name(ri)
          ext_itfc_name = self._get_interface_name_from_hosting_port(ext_port)
          for acl in acls:
              self._remove_dyn_nat_rule(acl, ext_itfc_name, vrf_name)
docs: Removes the NAT rules already configured when an internal network is
          removed.
  
          :param ri          -- router-info object
          :param ports       -- list of affected ports where network nat rules
                                was affected
          :param ext_port    -- external facing port
          :param intf_deleted-- If True, indicates that the subinterface was
                                deleted.