Called by Sphinx during phase 3 (resolving).

    * Combine child process' modified env with this one. Only changes should be new Imgur IDs since cache update is done
      in event_env_updated() after everything is merged and we're back to one process.

    :param sphinx.application.Sphinx app: Sphinx application object.
    :param sphinx.environment.BuildEnvironment env: Sphinx build environment.
    :param _: Not used.
    :param sphinx.environment.BuildEnvironment other: Sphinx build environment from child process.

def event_env_merge_info(app, env, _, other):
    """Called by Sphinx during phase 3 (resolving).

    * Combine child process' modified env with this one. Only changes should be new Imgur IDs since cache update is done
      in event_env_updated() after everything is merged and we're back to one process.

    :param sphinx.application.Sphinx app: Sphinx application object.
    :param sphinx.environment.BuildEnvironment env: Sphinx build environment.
    :param _: Not used.
    :param sphinx.environment.BuildEnvironment other: Sphinx build environment from child process.
    """
    other_album_cache = getattr(other, 'imgur_album_cache', None)
    other_image_cache = getattr(other, 'imgur_image_cache', None)
    if not other_album_cache and not other_image_cache:
        return
    album_cache = app.builder.env.imgur_album_cache
    image_cache = app.builder.env.imgur_image_cache
    assert env  # Linting.

    # Merge items.
    album_cache.update(other_album_cache)
    image_cache.update(other_image_cache)