docs: public static MetadataService getMetadataService(ServiceRequestContext ctx) {
          final MetadataService mds = ctx.attr(METADATA_SERVICE_ATTRIBUTE_KEY).get();
          if (mds != null) {
              return mds;
          }
          throw new IllegalStateException("No metadata service instance exists.");
      }