<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def parse(self):
 		""" Parses the SGF data stored in 'self.data', and returns a 'Collection'."""

		c = Collection()
		while self.index < self.datalen:
			g = self.parseOneGame()
			if g:
				c.append(g)
			else:
				break
		return c