code: def link_blob_into_repository(self, session, digest, source_repo, target_repo):
          
          self.log.debug("%s: Linking blob %s from %s to %s",
                         session.registry, digest, source_repo, target_repo)
  
          # Check that it exists in the source repository
          url = "/v2/{}/blobs/{}".format(source_repo, digest)
          result = session.head(url)
          if result.status_code == requests.codes.NOT_FOUND:
              self.log.debug("%s: blob %s, not present in %s, skipping",
                             session.registry, digest, source_repo)
              # Assume we don't need to copy it - maybe it's a foreign layer
              return
          result.raise_for_status()
  
          url = "/v2/{}/blobs/uploads/?mount={}&from={}".format(target_repo, digest, source_repo)
          result = session.post(url, data='')
          result.raise_for_status()
  
          if result.status_code != requests.codes.CREATED:
              # A 202-Accepted would mean that the source blob didn't exist and
              # we're starting an upload - but we've checked that above
              raise RuntimeError("Blob mount had unexpected status {}".format(result.status_code))
docs: Links ("mounts" in Docker Registry terminology) a blob from one repository in a
          registry into another repository in the same registry.