'Writes a common preamble that is used by root and block functions.
Primarily this sets up common local helpers and enforces a generator
through a dead branch.'

def write_commons(self):

    self.writeline('resolve    =    context.resolve_or_missing')
    self.writeline('undefined    =    environment.undefined')
    self.writeline('if    0:    yield    None')
