code: def prime(self, key, value):
          # type: (Hashable, Any) -> DataLoader
          
          cache_key = self.get_cache_key(key)
  
          # Only add the key if it does not already exist.
          if cache_key not in self._promise_cache:
              # Cache a rejected promise if the value is an Error, in order to match
              # the behavior of load(key).
              if isinstance(value, Exception):
                  promise = Promise.reject(value)
              else:
                  promise = Promise.resolve(value)
  
              self._promise_cache[cache_key] = promise
  
          return self
docs: Adds the provied key and value to the cache. If the key already exists, no
          change is made. Returns itself for method chaining.