code: def _patch_event_security():
      global ray
  
      if ray and not hasattr(ray, "report_event"):  # pragma: no cover
          # lower version of ray doesn't support event
  
          class EventSeverity(enum.Enum):
              INFO = 0
              WARNING = 1
              ERROR = 2
              FATAL = 3
  
          def _report_event(severity, label, message):
              logger.warning(
                  "severity: %s, label: %s, message: %s.",
                  severity,
                  label,
                  message,
              )
  
          import ray
  
          ray.EventSeverity = EventSeverity
          ray.report_event = _report_event
  
file_path: mars/mars/oscar/backends/ray/utils.py
imports: import asyncio
  import enum
  import logging
  import os
  import posixpath
  from urllib.parse import urlparse, unquote
  from ....utils import lazy_import, lazy_import_on_load
label_desc: Use image node_id 9 for calling a global function with example usage: _patch_event_security() without return types