def __init__(self, rows, machine):
self._rows = rows<EOL>self._machine = machine<EOL>self._completed_rows = []<EOL>self._on_row_completed = []<EOL>self.check()<EOL>
Create a needle interface.

        :param list rows: a list of lists of :attr:`needle positions
            <AYABInterface.machines.Machine.needle_positions>`
        :param AYABInterface.machines.Machine: the machine type to use
        :raises ValueError: if the arguments are not valid, see :meth:`check`