def settings_provider_factory(
msg: Union["Message", Sequence["Message"], None],
) -> Union[
ConfluentMetricsSettingsProvider,
BatchConfluentMetricsSettingsProvider,
]:
if isinstance(msg, Sequence):
return BatchConfluentMetricsSettingsProvider()
else:
return ConfluentMetricsSettingsProvider()