def create_dsmr_protocol(dsmr_version, telegram_callback, loop=None):
if dsmr_version == '<STR_LIT>':<EOL><INDENT>specification = telegram_specifications.V2_2<EOL>serial_settings = SERIAL_SETTINGS_V2_2<EOL><DEDENT>elif dsmr_version == '<STR_LIT:4>':<EOL><INDENT>specification = telegram_specifications.V4<EOL>serial_settings = SERIAL_SETTINGS_V4<EOL><DEDENT>elif dsmr_version == '<STR_LIT:5>':<EOL><INDENT>specification = telegram_specifications.V5<EOL>serial_settings = SERIAL_SETTINGS_V5<EOL><DEDENT>else:<EOL><INDENT>raise NotImplementedError("<STR_LIT>",<EOL>dsmr_version)<EOL><DEDENT>protocol = partial(DSMRProtocol, loop, TelegramParser(specification),<EOL>telegram_callback=telegram_callback)<EOL>return protocol, serial_settings<EOL>
Creates a DSMR asyncio protocol.