<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find(self, pattern):
 		""" 		Searches for a pattern in the current memory segment 		"""

		pos = self.current_segment.data.find(pattern)
		if pos == -1:
			return -1
		return pos + self.current_position