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

def wrap_result(self, name, result):
        '''
        Wrap a result from a function with it's stated fields

        :param name: fields to look up
        :type name: :py:class:`str`
        :param result: return value from function. Will be converted to tuple.
        :type result: anything

        :raises: :py:exc:`ValueError` if name has no associated fields

        :returns: :py:class:`dict`
        '''
        if not isinstance(result, tuple):
            result = tuple([result])

        try:
            return dict(zip(self.fields[name], result))
        except KeyError:
            msg = '"%s" has no associated fields'
            self.logger.exception(msg, name)
            raise ValueError(msg % name)