def telemetry_attributes_provider_factory(
msg: Union["Message", Sequence["Message"], None],
) -> Union[
ConfluentTelemetrySettingsProvider,
BatchConfluentTelemetrySettingsProvider,
]:
if isinstance(msg, Sequence):
return BatchConfluentTelemetrySettingsProvider()
else:
return ConfluentTelemetrySettingsProvider()