code: def _trim_buffer_garbage(rawmessage, debug=True):
      
      while rawmessage and rawmessage[0] != MESSAGE_START_CODE_0X02:
          if debug:
              _LOGGER.debug('Buffer content: %s', binascii.hexlify(rawmessage))
              _LOGGER.debug('Trimming leading buffer garbage')
          rawmessage = rawmessage[1:]
      return rawmessage
docs: Remove leading bytes from a byte stream.
  
      A proper message byte stream begins with 0x02.