<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def match_subgroup(sequence, pattern):
 """Yield the sub-group element dictionary that match a regex pattern."""


    for element in sequence:
        match = re.match(pattern, element)

        if match:
            yield match.groupdict()