def settings_provider_factory(
msg: Union["Msg", Sequence["Msg"], None],
) -> Union[
NatsMetricsSettingsProvider,
BatchNatsMetricsSettingsProvider,
None,
]:
if isinstance(msg, Sequence):
return BatchNatsMetricsSettingsProvider()
elif isinstance(msg, Msg) or msg is None:
return NatsMetricsSettingsProvider()
else:
# KeyValue and Object Storage watch cases
return None