code: 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 % namef 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)
docs: 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`