def METHOD_NAME(f):
    """Wraps a function or coroutine to create a new |RNG| in concurrent code paths.
    Calling this function on a function or coroutine object creates a wrapper which
    will execute the wrapped function with a new globally installed |RNG|. This
    ensures that random numbers in concurrent code paths (:mod:`threads <threading>`,
    :mod:`multiprocessing`, :mod:`asyncio`) are deterministically generated yet
    uncorrelated.
    .. warning::
        If the control flow within a single code path depends on communication events
        with concurrent code, e.g., the order in which some parallel jobs finish,
        deterministic behavior can no longer be guaranteed by just using :func:`spawn_rng`.
        In such cases, the code additionally has to ensure that random numbers are sampled
        independently of the communication order.
    Parameters
    ----------
    f
        The function or coroutine to wrap.
    Returns
    -------
    The wrapped function or coroutine.
    """
    seed_seq = get_seed_seq().spawn(1)[0]
    if inspect.iscoroutine(f):
        async def spawn_rng_wrapper():
            with new_rng(seed_seq):
                return await f
        return spawn_rng_wrapper()
    elif inspect.isfunction(f):
        return _SpawnRngWrapper(f, seed_seq)  # use a class to obtain something picklable
    else:
        raise TypeError