def add_line(self, line=None, **kwargs):
        """Adds a Line instance to this document. Will provide a LineNo if you do not"""
        if kwargs:
            line = Line(**kwargs)
        if not isinstance(line, Line):
            raise AvalaraTypeException(AvalaraException.CODE_BAD_LINE, '%r is not a %r' % (line, Line))
        if not hasattr(line, 'LineNo'):
            count = len(self.Lines)
            setattr(line, 'LineNo', count + 1)  # start at one
            Document.logger.debug('%s inserting LineNo %d' % (getattr(self, 'DocCode', None), line.LineNo))
        self.Lines.append(line)
dataset/ETHPy150Open activefrequency/pyavatax/pyavatax/base.py/Document.add_line/original