Similar to _get_list() except that the return value is required
        to be a str.  This calls _get_list() to retrieve the value,
        but raises an exception unless the return is None or a
        single-valued list when that value will be returned.

        If a default value is provided, it will be returned if the
        value passed is None.  It is not applied during recursion,
        but will be applied if the result of the recursion is None.

def _get(self, value, context=None, default=None):
        """
        Similar to _get_list() except that the return value is required
        to be a str.  This calls _get_list() to retrieve the value,
        but raises an exception unless the return is None or a
        single-valued list when that value will be returned.

        If a default value is provided, it will be returned if the
        value passed is None.  It is not applied during recursion,
        but will be applied if the result of the recursion is None.
    """
        if value is None:
            return default

        ret = self._get_list(value, context=context)
        if ret is None:
            return default
        name = getattr(self, '_name', None)
        if isinstance(ret, list):
            if len(ret) == 0:
                raise TaskError(name, "Value '%s' resolved to an empty list" % (value,))
            elif len(ret) == 1:
                return ret[0]
            else:
                raise TaskError(name, "Value %r resolved to a multi-valued list %s" % (value, ret))
        else:
            raise TaskError(name, "Value %r resolved to unexpect type %s" % (value, type(ret).__name__))