def close(self):
        """
        Call :func:`os.close` on :attr:`fd` if it is not :data:`None`,
        then set it to :data:`None`.
        """
        if not self.closed:
            _vv and IOLOG.debug('%r.close()', self)
            self.closed = True
            os.close(self.fd)
Call :func:`os.close` on :attr:`fd` if it is not :data:`None`,
        then set it to :data:`None`.