code: def log_event(self, text, timestamp=None):
          
          try:
              # Only works on Windows
              text = text.encode("mbcs")
          except LookupError:
              text = text.encode("ascii")
          comment = b"Added by python-can"
          marker = b"python-can"
          data = GLOBAL_MARKER_STRUCT.pack(
              0, 0xFFFFFF, 0xFF3300, 0, len(text), len(marker), len(comment))
          self._add_object(GLOBAL_MARKER, data + text + marker + comment, timestamp)
docs: Add an arbitrary message to the log file as a global marker.
  
          :param str text:
              The group name of the marker.
          :param float timestamp:
              Absolute timestamp in Unix timestamp format. If not given, the
              marker will be placed along the last message.