<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def remove_file_ident_desc_by_name(self, name, logical_block_size):
        # type: (bytes, int) -> int
        '''
        A method to remove a UDF File Identifier Descriptor from this UDF File
        Entry.

        Parameters:
         name - The name of the UDF File Identifier Descriptor to remove.
         logical_block_size - The logical block size to use.
        Returns:
         The number of extents removed due to removing this File Identifier Descriptor.
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF File Entry not initialized')

        tmp_fi_desc = UDFFileIdentifierDescriptor()
        tmp_fi_desc.isparent = False
        tmp_fi_desc.fi = name

        # If flags bit 3 is set, the entries are sorted.
        desc_index = len(self.fi_descs)
        for index, fi_desc in enumerate(self.fi_descs):
            if fi_desc.fi == name:
                desc_index = index
                break
        if desc_index == len(self.fi_descs) or self.fi_descs[desc_index].fi != name:
            raise pycdlibexception.PyCdlibInvalidInput('Cannot find file to remove')

        this_desc = self.fi_descs[desc_index]
        if this_desc.is_dir():
            if this_desc.file_entry is None:
                raise pycdlibexception.PyCdlibInternalError('No UDF File Entry for UDF File Descriptor')
            if len(this_desc.file_entry.fi_descs) > 1:
                raise pycdlibexception.PyCdlibInvalidInput('Directory must be empty to use rm_directory')
            self.file_link_count -= 1

        old_num_extents = utils.ceiling_div(self.info_len, logical_block_size)
        self.info_len -= UDFFileIdentifierDescriptor.length(len(this_desc.fi))
        new_num_extents = utils.ceiling_div(self.info_len, logical_block_size)
        self.alloc_descs[0][0] = self.info_len

        del self.fi_descs[desc_index]

        return old_num_extents - new_num_extents