def METHOD_NAME(*names):
    """
    Enable outer_atomics with names.
    Can be used either as a decorator or a context manager.
    See docstring of outer_atomic for details.
    Arguments:
        names (variable-lenght argument list): Names of outer_atomics.
    """
    if len(names) == 0:
        raise ValueError("At least one name must be specified.")
    cache = get_cache(OUTER_ATOMIC_CACHE_NAME)
    for name in names:
        cache[name] = True
    try:
        yield
    finally:
        for name in names:
            del cache[name]