def get_bytes(self, line_number):
if line_number not in self._needle_position_bytes_cache:<EOL><INDENT>line = self._get(line_number)<EOL>if line is None:<EOL><INDENT>line_bytes = None<EOL><DEDENT>else:<EOL><INDENT>line_bytes = self._machine.needle_positions_to_bytes(line)<EOL><DEDENT>self._needle_position_bytes_cache[line_number] = line_bytes<EOL><DEDENT>return self._needle_position_bytes_cache[line_number]<EOL>
Get the bytes representing needle positions or None.

        :param int line_number: the line number to take the bytes from
        :rtype: bytes
        :return: the bytes that represent the message or :obj:`None` if no
          data is there for the line.

        Depending on the :attr:`machine`, the length and result may vary.