def enum_subpattern(p):
    subpattern_id, d = p
    patterns = list(enum_gen(d))

    '''
    if subpattern_id:
        subpat_iter = EnumSubpatternIterator(subpattern_id, patterns)
        SUBPATTERNS[subpattern_id] = subpat_iter
        return subpat_iter
    else:
        return patterns
        '''
    return patterns
def enum_subpattern ( p ) : subpattern_id , d = p patterns = list ( enum_gen ( d ) ) '''
    if subpattern_id:
        subpat_iter = EnumSubpatternIterator(subpattern_id, patterns)
        SUBPATTERNS[subpattern_id] = subpat_iter
        return subpat_iter
    else:
        return patterns
        ''' return patterns
if subpattern_id:
        subpat_iter = EnumSubpatternIterator(subpattern_id, patterns)
        SUBPATTERNS[subpattern_id] = subpat_iter
        return subpat_iter
    else:
        return patterns