Returns d[k] or [d[k]] if the value is not a list

def _index_list_of_values(d, k):
    """Returns d[k] or [d[k]] if the value is not a list"""
    v = d[k]
    if isinstance(v, list):
        return v
    return [v]