code: def add_handler(self, fd, handler, events):
      fd, fileobj = self.split_fd(fd)
      if fd in self.handlers:
          raise ValueError("fd %s added twice" % fd)
      self.handlers[fd] = (fileobj, stack_context.wrap(handler))
      if events & IOLoop.READ:
          self.asyncio_loop.add_reader(
              fd, self._handle_events, fd, IOLoop.READ
          )
          self.readers.add(fd)
      if events & IOLoop.WRITE:
          self.asyncio_loop.add_writer(
              fd, self._handle_events, fd, IOLoop.WRITE
          )
          self.writers.add(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 3 for calling the BaseAsyncIOLoop obj's underlying member method code with example usage: obj.add_handler(fd, handler, events) without return types