'Return the key associated to a given file descriptor
Return None if it is not found.'

def _key_from_fd(self, fd):

    try:
        return self._fd_to_key[fd]
    except KeyError:
        return None
