<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fromfd(cls, fd):
 """ Create a new epoll object from a given file descriptor :param fd: A pre-made file descriptor obtained from ``epoll_create(2)`` or ``epoll_create1(2)`` :raises ValueError: If fd is not a valid file descriptor :returns: A new epoll object .. note:: If the passed descriptor is incorrect then various methods will fail and raise OSError with an appropriate message. """

        if fd < 0:
            _err_closed()
        self = cls.__new__()
        object.__init__(self)
        self._epfd = fd
        return self