<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_segment(self, ea):

 """ do a linear search for the given address in the segment list """

        for seg in self.seglist:
            if seg.startea <= ea < seg.endea:
                return seg