<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def segment_text(text, seg_regex=SEG_REGEX):
 """Return an iterator of segments in the text. Args: text (unicode):
 string of IPA Unicode text seg_regex (_regex.Pattern):
 compiled regex defining a segment (base + modifiers) Return: generator: segments in the input text """

    for m in seg_regex.finditer(text):
        yield m.group(0)