code: def store_manifest_in_repository(self, session, manifest, media_type,
                                       source_repo, target_repo, digest=None, tag=None):
          
  
          if tag:
              self.log.debug("%s: Tagging manifest (or list) from %s as %s:%s",
                             session.registry, source_repo, target_repo, tag)
              ref = tag
          elif digest:
              self.log.debug("%s: Storing manifest (or list) %s from %s in %s",
                             session.registry, digest, source_repo, target_repo)
              ref = digest
          else:
              raise RuntimeError("Either digest or tag must be specified")
  
          self.link_manifest_references_into_repository(session, manifest, media_type,
                                                        source_repo, target_repo)
  
          url = '/v2/{}/manifests/{}'.format(target_repo, ref)
          headers = {'Content-Type': media_type}
          response = session.put(url, data=manifest, headers=headers)
          response.raise_for_status()
docs: Stores the manifest into target_repo, possibly tagging it. This may involve
          copying referenced blobs from source_repo.