def hashable(raw):
    """If `raw` contains nested lists, convert them to tuples

    >>> hashable(('a', 'b', 'c'))
    ('a', 'b', 'c')
    >>> hashable(('a', ['b', 'c'], 'd'))
    ('a', ('b', 'c'), 'd')
    """

    result = tuple(hashable(itm) if isinstance(itm, list) else itm
                   for itm in raw)
    return result