def write_variant(number):
if number < <NUM_LIT>:<EOL><INDENT>return bytes([number])<EOL><DEDENT>return bytes([(number & <NUM_LIT>) | <NUM_LIT>]) + write_variant(number >> <NUM_LIT:7>)<EOL>
Convert an integer to a protobuf variant binary buffer.