def _mp_init_lock(lock):
    """Initialize lock for :mod:`multiprocessing`.

    Args:
        lock (multiprocessing.synchronize.Lock): the lock to be shared among tasks

    """
    global task_lock
    task_lock = lock
