code: def _resolve(self, spec):
      
      if not spec.remote:
        return spec
  
      try:
        resolved_urls = self._resolver.resolve(spec.remote)
        if resolved_urls:
          # keep the bar separated list of URLs convention
          return CacheSpec(local=spec.local, remote='|'.join(resolved_urls))
        # no-op
        return spec
      except Resolver.ResolverError as e:
        self._log.warn('Error while resolving from {0}: {1}'.format(spec.remote, str(e)))
        # If for some reason resolver fails we continue to use local cache
        if spec.local:
          return CacheSpec(local=spec.local, remote=None)
        # resolver fails but there is no local cache
        return None
docs: Attempt resolving cache URIs when a remote spec is provided.