def parse_time(time_str, ctx={}):
    """ start:stop:step (arbitrary types, with local ctx) OR index """
    if ':' not in time_str:
        return eval(time_str, {}, ctx)
    s = []
    for i in time_str.split(':'):
        if len(i) > 0:
            s.append(eval(i, {}, ctx))
        else:
            s.append(None)
    return slice(*s)
