code: def resolve(self,size, distribution):
          
          if not self.variablesize():
              raise Exception("Can only resize patterns with * wildcards")
  
          nrofwildcards = 0
          for x in self.sequence:
              if x == '*':
                  nrofwildcards += 1
  
          assert (len(distribution) == nrofwildcards)
  
          wildcardnr = 0
          newsequence = []
          for x in self.sequence:
              if x == '*':
                  newsequence += [True] * distribution[wildcardnr]
                  wildcardnr += 1
              else:
                  newsequence.append(x)
          d = { 'matchannotation':self.matchannotation, 'matchannotationset':self.matchannotationset, 'casesensitive':self.casesensitive }
          yield Pattern(*newsequence, **d )
docs: Resolve a variable sized pattern to all patterns of a certain fixed size