def process_tag_pattern(pattern, variables=None):
 if (variables is None):
  variables = {}
 if isinstance(pattern, str):
  pattern = bre.compile_search((pattern % variables), (bre.I | bre.M))
 return pattern

def process_tag_pattern ( pattern , variables = None ) : if ( variables is None ) : variables = { } if isinstance ( pattern , str ) : pattern = bre . compile_search ( ( pattern % variables ) , ( bre . I | bre . M ) ) return pattern
process the tag pattern .