code: def update_handler(self, fd, events):
      fd, fileobj = self.split_fd(fd)
      if events & IOLoop.READ:
          if fd not in self.readers:
              self.asyncio_loop.add_reader(
                  fd, self._handle_events, fd, IOLoop.READ
              )
              self.readers.add(fd)
      else:
          if fd in self.readers:
              self.asyncio_loop.remove_reader(fd)
              self.readers.remove(fd)
      if events & IOLoop.WRITE:
          if fd not in self.writers:
              self.asyncio_loop.add_writer(
                  fd, self._handle_events, fd, IOLoop.WRITE
              )
              self.writers.add(fd)
      else:
          if fd in self.writers:
              self.asyncio_loop.remove_writer(fd)
              self.writers.remove(fd)
  
imports: from __future__ import absolute_import, division, print_function
  import functools
  import tornado.concurrent
  from tornado.gen import convert_yielded
  from tornado.ioloop import IOLoop
  from tornado import stack_context
label_desc: Use image node_id 4 for calling the BaseAsyncIOLoop obj's underlying member method code with example usage: obj.update_handler(fd, events) without return types