code: public Configuration build() {
      Validate.notNull(this.submissionRuntime, "Default Runtime was not defined");
  
      if(!this.defaultRuntime.isPresent() || this.runtimeNames.size() == 1){
        this.defaultRuntime = Optional.of(this.runtimeNames.toArray(new String[0])[0]);
      }
  
      Validate.isTrue(this.defaultRuntime.isPresent(),
              "Default runtime was not defined, and multiple runtimes were specified");
  
      if(!this.runtimeNames.contains(this.defaultRuntime.get())){
        this.runtimeNames.add(this.defaultRuntime.get());
      }
  
      JavaConfigurationBuilder conf = Tang.Factory.getTang().newConfigurationBuilder();
  
      for(Map.Entry<Class, Object> entry: this.namedParameters.entrySet()){
        conf = conf.bindNamedParameter(entry.getKey(), entry.getValue().toString());
      }
  
      conf = conf.bindNamedParameter(DefaultRuntimeName.class, this.defaultRuntime.get());
  
      for(final String runtimeName : this.runtimeNames){
        conf = conf.bindSetEntry(RuntimeNames.class, runtimeName);
      }
  
      if(!this.submissionRuntime.equalsIgnoreCase(RuntimeIdentifier.RUNTIME_NAME)){
        throw new RuntimeException("Unsupported submission runtime " + this.submissionRuntime);
      }
  
      conf = conf.bindImplementation(MultiRuntimeMainConfigurationGenerator.class,
              YarnMultiRuntimeMainConfigurationGeneratorImpl.class);
  
      // Currently only local runtime is supported as a secondary runtime
      return Configurations.merge(conf.build(),
              ExtensibleYarnClientConfiguration.CONF
                      .set(ExtensibleYarnClientConfiguration.DRIVER_CONFIGURATION_PROVIDER,
                              MultiRuntimeDriverConfigurationProvider.class).build());
    }
docs: Builds the configuration.
  @return The built configuration