code: def get_manifest(self, session, repository, ref):
          
          self.log.debug("%s: Retrieving manifest for %s:%s", session.registry, repository, ref)
  
          headers = {
              'Accept': ', '.join(self.manifest_media_types)
          }
  
          url = '/v2/{}/manifests/{}'.format(repository, ref)
          response = session.get(url, headers=headers)
          response.raise_for_status()
          return (response.content,
                  response.headers['Docker-Content-Digest'],
                  response.headers['Content-Type'],
                  int(response.headers['Content-Length']))
docs: Downloads a manifest from a registry. ref can be a digest, or a tag.