'Args:
formatters: See docstring for CompileTemplate
predicates: See docstring for CompileTemplate'

def __init__(self, formatters, predicates):

    self.current_block = _Section()
    self.stack = [self.current_block]
    if isinstance(formatters, dict):
        formatters = DictRegistry(formatters)
    elif callable(formatters):
        formatters = CallableRegistry(formatters)
    default_formatters = PrefixRegistry([('pluralize', _Pluralize), ('cycle', _Cycle)])
    self.formatters = ChainedRegistry([formatters, DictRegistry(_DEFAULT_FORMATTERS), default_formatters])
    if isinstance(predicates, dict):
        predicates = DictRegistry(predicates)
    elif callable(predicates):
        predicates = CallableRegistry(predicates)
    self.predicates = ChainedRegistry([predicates, DictRegistry(_DEFAULT_PREDICATES)])
