code: def _normalize(self, flags):
          
          norm = None
          if isinstance(flags, MessageFlags):
              norm = flags.bytes
          elif isinstance(flags, bytearray):
              norm = binascii.hexlify(flags)
          elif isinstance(flags, int):
              norm = bytes([flags])
          elif isinstance(flags, bytes):
              norm = binascii.hexlify(flags)
          elif isinstance(flags, str):
              flags = flags[0:2]
              norm = binascii.hexlify(binascii.unhexlify(flags.lower()))
          elif flags is None:
              norm = None
          else:
              _LOGGER.warning('MessageFlags with unknown type %s: %r',
                              type(flags), flags)
          return norm
docs: Take any format of flags and turn it into a hex string.