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

def find_file_ident_desc_by_name(self, currpath):
        # type: (bytes) -> UDFFileIdentifierDescriptor
        '''
        A method to find a UDF File Identifier descriptor by its name.

        Parameters:
         currpath - The UTF-8 encoded name to look up.
        Returns:
         The UDF File Identifier descriptor corresponding to the passed in name.
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF File Entry not initialized')

        # If this is a directory or it is an empty directory, just skip
        # all work.
        if self.icb_tag.file_type != 4 or not self.fi_descs:
            raise pycdlibexception.PyCdlibInvalidInput('Could not find path')

        tmp = currpath.decode('utf-8')
        try:
            latin1_currpath = tmp.encode('latin-1')
        except (UnicodeDecodeError, UnicodeEncodeError):
            latin1_currpath = b''
        ucs2_currpath = tmp.encode('utf-16_be')

        child = None

        for fi_desc in self.fi_descs:
            if latin1_currpath and fi_desc.encoding == 'latin-1':
                eq = fi_desc.fi == latin1_currpath
            else:
                eq = fi_desc.fi == ucs2_currpath

            if eq:
                child = fi_desc
                break

        if child is None:
            raise pycdlibexception.PyCdlibInvalidInput('Could not find path')

        return child