<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def optional(e, default=Ignore):
 """ Create a PEG function to optionally match an expression. """

    def match_optional(s, grm=None, pos=0):
        try:
            return e(s, grm, pos)
        except PegreError:
            return PegreResult(s, default, (pos, pos))
    return match_optional