class_docstr: A kqueue-based event loop for BSD/Mac systems.
code: def _control(self, fd, events, flags):
      kevents = []
      if events & IOLoop.WRITE:
          kevents.append(
              select.kevent(
                  fd, filter=select.KQ_FILTER_WRITE, flags=flags
              )
          )
      if events & IOLoop.READ:
          kevents.append(
              select.kevent(
                  fd, filter=select.KQ_FILTER_READ, flags=flags
              )
          )
      # Even though control() takes a list, it seems to return EINVAL
      # on Mac OS X (10.6) when there is more than one event in the list.
      for kevent in kevents:
          self._kqueue.control([kevent], 0)
  
file_path: catboost/contrib/python/tornado/tornado-4/tornado/platform/kqueue.py
imports: from __future__ import absolute_import, division, print_function
  import select
  from tornado.ioloop import IOLoop, PollIOLoop
label_desc: Use image node_id 7 for calling the _KQueue obj's underlying member method code with example usage: obj._control(fd, events, flags) without return types