<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, signals):
 """ Create a new signalfd object from a given file descriptor :param fd: A pre-made file descriptor obtained from ``signalfd_create(2)` :param signals: A pre-made frozenset that describes the monitored signals :raises ValueError: If fd is not a valid file descriptor :returns: A new signalfd 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._sfd = fd
        self._signals = signals
        return self