code: def _patch_policy():
      """Patch the policy to always return a patched loop."""
  
      def get_event_loop(self):
          if self._local._loop is None:
              loop = self.new_event_loop()
              _patch_loop(loop)
              self.set_event_loop(loop)
          return self._local._loop
  
      policy = events.get_event_loop_policy()
      policy.__class__.get_event_loop = get_event_loop
  
file_path: catboost/contrib/python/nest-asyncio/nest_asyncio.py
imports: import asyncio
  import asyncio.events
  import os
  import sys
  import threading
  from contextlib import contextmanager, suppress
  from heapq import heappop
label_desc: Use image node_id 3 for calling a global function with example usage: _patch_policy() and returns: self