code: private Metadata createMetadata(String resource) {
      Metadata metadata = new Metadata();
      if (resource != null) {
        metadata.put(GRPC_RESOURCE_PREFIX_KEY, resource);
      }
      return metadata;
    }
docs: Creates a {@link Metadata} that contains pertinent headers.