def METHOD_NAME(self, cvar):
    deps = [cvar]
    if hasattr(cvar, 'py_func'):
        # TODO: does the cache key need to depend on any other
        # attributes of the Dispatcher?
        closure = cvar.py_func.__closure__
        deps = [cvar.py_func.__code__.co_code]
    elif hasattr(cvar, '__closure__'):
        closure = cvar.__closure__
        # if cvar is a function and closes over a Dispatcher, the
        # cache will be busted because of the uuid that is regenerated
        deps = [cvar.__code__.co_code]
    else:
        closure = None
    if closure is not None:
        for x in closure:
            deps.extend(self.METHOD_NAME(x.cell_contents))
    return deps