def _write_elan_attributes(self, converter):
        """ Writes the ELAN information for toolbox files.

            Parameters
            ----------
            :param converter: str
                The source for the attributes
        """
        if len(self._elan_begin_nodes) == 0 \
                and len(self._elan_end_nodes) == 0 \
                and len(self._elan_participant_nodes) == 0:
            return
        if len(self._elan_begin_nodes) > 0:
            begin_node = self._elan_begin_nodes[0]
            begin_annotation = converter.annotation_value_for_node(begin_node)
        else:
            begin_annotation = '0'
        if len(self._elan_end_nodes) > 0:
            end_node = self._elan_end_nodes[0]
            end_annotation = converter.annotation_value_for_node(end_node)
        else:
            end_annotation = '0'
        if len(self._elan_participant_nodes) > 0:
            participant_node = self._elan_participant_nodes[0]
            participant_annotation = converter.annotation_value_for_node(participant_node)
        else:
            participant_annotation = ''

        begin_time = self._string_to_milliseconds(begin_annotation)
        end_time = self._string_to_milliseconds(end_annotation)

        duration = begin_time - end_time

        self._phrase_element.set('offset', str(begin_time))
        self._phrase_element.set('duration', str(duration))
        self._phrase_element.set('speaker', participant_annotation)
dataset/ETHPy150Open cidles/poio-api/src/poioapi/io/typecraft.py/Writer._write_elan_attributes/swapped operands of `-`