def METHOD_NAME(self):
    """generate output and write it to files"""
    TopBlockGenerator.METHOD_NAME(self)
    data = yaml.dump(self._build_block_n_from_flow_graph_io())
    replace = [
        ('parameters:', '\nparameters:'),
        ('inputs:', '\ninputs:'),
        ('outputs:', '\noutputs:'),
        ('asserts:', '\nasserts:'),
        ('templates:', '\ntemplates:'),
        ('documentation:', '\ndocumentation:'),
        ('file_format:', '\nfile_format:'),
    ]
    for r in replace:
        data = data.replace(*r)
    with codecs.open(self.file_path_yml, 'w', encoding='utf-8') as fp:
        fp.METHOD_NAME(data)
    # Windows only supports S_IREAD and S_IWRITE, other flags are ignored
    os.chmod(self.file_path_yml, self._mode)