def reftag_to_cls(fn):
    """
    decorator that checks function arguments for `concrete` and `resource`
    and will properly set them to class references if a string (reftag) is
    passed as the value
    """
    names, _, _, values = inspect.getargspec(fn)
    @wraps(fn)
    def wrapped(*args, **kwargs):
        i = 0
        backend = args[0]
        for name in names[1:]:
            value = args[i]
            if name == "concrete" and isinstance(value, six.string_types):
                args[i] = backend.REFTAG_CONCRETE[value]
            elif name == "resource" and isinstance(value, six.string_types):
                args[i] = backend.REFTAG_RESOURCE[value]
            i += 1
        return fn(*args, **kwargs)
    return wrapped