def METHOD_NAME(vals, range):
    if vals is not None:
        return ", ".join(vals)
    if range is not None:
        lower, upper = range
        if lower is not None and upper is not None:
            return lower + " to " + upper
        elif lower is not None and upper is None:
            return "less than " + lower
        elif lower is None and upper is not None:
            return "greater than " + upper
    return ""