def METHOD_NAME(
    docker_compose_path: Path,
    service_name: str,
    host_environ: dict = None,
    image_environ: dict = None,
    *,
    use_env_devel=True,
) -> EnvVarsDict:
    """Deduces a service environment with it runs in a stack from confirmation
    :param docker_compose_path: path to stack configuration
    :type docker_compose_path: Path
    :param service_name: service name as defined in docker-compose file
    :type service_name: str
    :param host_environ: environs in host when stack is started, defaults to None
    :type host_environ: Dict, optional
    :param image_environ: environs set in Dockerfile, defaults to None
    :type image_environ: Dict, optional
    :param image_environ: environs set in Dockerfile, defaults to None
    :rtype: Dict
    """
    docker_compose_dir = docker_compose_path.parent.resolve()
    with docker_compose_path.open() as f:
        content = yaml.safe_load(f)
    service = content["services"][service_name]
    replace_environs_in_docker_compose_service(
        service, docker_compose_dir, host_environ, use_env_devel=use_env_devel
    )
    host_environ = host_environ or {}
    image_environ = image_environ or {}
    # Environ expected in a running service
    service_environ: EnvVarsDict = {}
    service_environ.update(image_environ)
    service_environ.update(service["environment"])
    return service_environ