def close_fd(self, fd):
        """Utility method to close an ``fd``.

        If ``fd`` is a file-like object, we close it directly; otherwise
        we use `os.close`.

        This method is provided for use by `IOLoop` subclasses (in
        implementations of ``IOLoop.close(all_fds=True)`` and should
        not generally be used by application code.

        .. versionadded:: 4.0
        """
        try:
            try:
                fd.close()
            except __HOLE__:
                os.close(fd)
        except OSError:
            pass
dataset/ETHPy150Open RobotWebTools/rosbridge_suite/rosbridge_server/src/tornado/ioloop.py/IOLoop.close_fd