<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def free_cache(ctx, *elts):
 """Free properties bound to input cached elts. If empty, free the whole cache. """


    for elt in elts:
        if isinstance(elt, Hashable):
            cache = __STATIC_ELEMENTS_CACHE__
        else:
            cache = __UNHASHABLE_ELTS_CACHE__
            elt = id(elt)
        if elt in cache:
            del cache[elt]

    if not elts:
        __STATIC_ELEMENTS_CACHE__.clear()
        __UNHASHABLE_ELTS_CACHE__.clear()