code: @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1789")
    public static <T extends AbstractStub<T>> T attachHeaders(T stub, Metadata extraHeaders) {
      return stub.withInterceptors(newAttachHeadersInterceptor(extraHeaders));
    }
docs: Attaches a set of request headers to a stub.
  
  @param stub to bind the headers to.
  @param extraHeaders the headers to be passed by each call on the returned stub.
  @return an implementation of the stub with {@code extraHeaders} bound to each call.