<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def strip_encoding_cookie(filelike):
 """Generator to pull lines from a text-mode file, skipping the encoding cookie if it is found in the first two lines. """

    it = iter(filelike)
    try:
        first = next(it)
        if not cookie_comment_re.match(first):
            yield first
        second = next(it)
        if not cookie_comment_re.match(second):
            yield second
    except StopIteration:
        return

    for line in it:
        yield line