Generate the beginning part

def begin(self):
        """Generate the beginning part"""
        self.out_f.write('\n')
        for depth, name in enumerate(self.names):
            self.out_f.write(
                '{0}namespace {1}\n{0}{{\n'.format(self.prefix(depth), name)
            )