docs: @DefaultVisibilityForTesting
    static MetricsComponent loadMetricsComponent(@Nullable ClassLoader classLoader) {
      try {
        // Call Class.forName with literal string name of the class to help shading tools.
        return Provider.createInstance(
            Class.forName(
                "io.opencensus.impl.metrics.MetricsComponentImpl", /*initialize=*/ true, classLoader),
            MetricsComponent.class);
      } catch (ClassNotFoundException e) {
        logger.log(
            Level.FINE,
            "Couldn't load full implementation for MetricsComponent, now trying to load lite "
                + "implementation.",
            e);
      }
      try {
        // Call Class.forName with literal string name of the class to help shading tools.
        return Provider.createInstance(
            Class.forName(
                "io.opencensus.impllite.metrics.MetricsComponentImplLite",
                /*initialize=*/ true,
                classLoader),
            MetricsComponent.class);
      } catch (ClassNotFoundException e) {
        logger.log(
            Level.FINE,
            "Couldn't load lite implementation for MetricsComponent, now using default "
                + "implementation for MetricsComponent.",
            e);
      }
      return MetricsComponent.newNoopMetricsComponent();
    }