def get_recent(thing1=None, thing2=None):
    ctx = context.get_context()
    if thing1 is None:
        return [k for k in ctx.recent.keys()]
    if thing2 is None:
        if isinstance(ctx.recent[thing1], (dict, cache.Cache)):
            return dict([(repr(k), list(v))
                         for k, v in ctx.recent[thing1].items()])
        else:
            return list(ctx.recent[thing1])
    else:
        if isinstance(ctx.recent[thing1], (dict, cache.Cache)):
            return dict([(repr(k), list(v)) for k, v in
                         ctx.recent[thing1].items() if thing2 in str(k)])
        else:
            return '{"error":"' + thing1 + ' recent data is not dict."}'
dataset/ETHPy150Open paypal/support/support/meta_service/meta_service.py/get_recent/original