<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_all_manifests(image, registry, insecure=False, dockercfg_path=None, versions=('v1', 'v2', 'v2_list')):
 """Return manifest digests for image. :param image: ImageName, the remote image to inspect :param registry: str, URI for registry, if URI schema is not provided, https:// will be used :param insecure: bool, when True registry's cert is not verified :param dockercfg_path: str, dirname of .dockercfg location :param versions: tuple, for which manifest schema versions to fetch manifests :return: dict of successful responses, with versions as keys """

    digests = {}
    registry_session = RegistrySession(registry, insecure=insecure, dockercfg_path=dockercfg_path)
    for version in versions:
        response, _ = get_manifest(image, registry_session, version)
        if response:
            digests[version] = response

    return digests