private static <T> T getDefaultOptionValue(
      final CommandLine commandLine,
      final String optionName,
      final CommandLine.ITypeConverter<T> converter) {

    CommandLine.Model.OptionSpec optionSpec = commandLine.getCommandSpec().findOption(optionName);
    if (optionSpec == null || commandLine.getDefaultValueProvider() == null) {
      return null;
    }

    try {
      String defaultValueString = commandLine.getDefaultValueProvider().defaultValue(optionSpec);
      return defaultValueString != null
          ? converter.convert(defaultValueString)
          : optionSpec.getValue();
    } catch (Exception e) {
      throw new RuntimeException(
          "Failed to convert default value for option " + optionName + ": " + e.getMessage(), e);
    }
  }
Retrieves the default value for a specified command line option, converting it to its
appropriate type.

@param <T> The type of the option value.
@param commandLine The {@link CommandLine} instance containing the parsed command line options.
@param optionName The name of the option whose default value is to be retrieved.
@param converter A converter that converts the option's default string value to its appropriate
    type.
@return The default value of the specified option converted to its type, or {@code null} if the
    option does not exist, does not have a default value, or if an error occurs during
    conversion.
@throws RuntimeException if there is an error converting the default value string to its type.
app/src/main/java/org/hyperledger/besu/cli/util/CommandLineUtils.java