<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def bibitems(self):
 """List of bibitem strings appearing in the document."""

        bibitems = []
        lines = self.text.split('\n')
        for i, line in enumerate(lines):
            if line.lstrip().startswith(u'\\bibitem'):
                # accept this line
                # check if next line is also part of bibitem
                # FIXME ugh, re-write
                j = 1
                while True:
                    try:
                        if (lines[i + j].startswith(u'\\bibitem') is False) \
                                and (lines[i + j] != '\n'):
                            line += lines[i + j]
                        elif "\end{document}" in lines[i + j]:
                            break
                        else:
                            break
                    except IndexError:
                        break
                    else:
                        print line
                        j += 1
                print "finished", line
                bibitems.append(line)
        return bibitems