def METHOD_NAME():
    parser = ArgumentParser(description=__doc__)
    parser.add_argument('--version', action='version', version='%(prog)s')
    parser.add_argument('-m', '--max-order', metavar='order', type=int,
                        action='store', dest='max_order',
                        default=10, help=helps['max_order'])
    parser.add_argument('--plot',
                        action='store_true', dest='plot',
                        default=False, help=helps['plot'])
    options = parser.parse_args()
    max_order = options.max_order
    (legs, clegs, dlegs, cdlegs,
     lobs, clobs, dlobs, cdlobs,
     kerns, ckerns, dkerns, cdkerns,
     denoms) = gen_lobatto(max_order)
    if options.plot:
        plot_polys(1, lobs)
        plot_polys(11, dlobs)
        plot_polys(2, kerns)
        plot_polys(21, dkerns)
        plot_polys(3, legs, var_name='y')
        plot_polys(31, dlegs, var_name='y')
        plt.show()
    indir = InDir(os.path.join(top_dir, 'sfepy/discrete/fem/extmods/'))
    fd = open(indir('lobatto1d_template.h'), 'r')
    template = fd.read()
    fd.close
    fd = open(indir('lobatto1d.h'), 'w')
    out = []
    append_declarations(out, clobs, 'Lobatto', 'lobatto')
    append_declarations(out, cdlobs, 'Derivatives of Lobatto', 'd_lobatto')
    append_declarations(out, ckerns, 'Kernel', 'kernel',
                        shift=2)
    append_declarations(out, cdkerns, 'Derivatives of kernel', 'd_kernel',
                        shift=2)
    append_declarations(out, clegs, 'Legendre', 'legendre')
    append_declarations(out, cdlegs, 'Derivatives of Legendre', 'd_legendre')
    fd.write(template.replace('// REPLACE_TEXT', ''.join(out)))
    fd.close()
    fd = open(indir('lobatto1d_template.c'), 'r')
    template = fd.read()
    fd.close()
    fd = open(indir('lobatto1d.c'), 'w')
    out = []
    names_lobatto = append_polys(out, clobs,
                                 'Lobatto', 'lobatto')
    names_d_lobatto = append_polys(out, cdlobs,
                                   'Derivatives of Lobatto', 'd_lobatto')
    names_kernel = append_polys(out, ckerns,
                                'Kernel', 'kernel',
                                shift=2)
    names_d_kernel = append_polys(out, cdkerns,
                                  'Derivatives of kernel', 'd_kernel',
                                  shift=2)
    names_legendre = append_polys(out, clegs,
                                  'Legendre', 'legendre',
                                  var_name='y')
    names_d_legendre = append_polys(out, cdlegs,
                                    'Derivatives of Legendre', 'd_legendre',
                                    var_name='y')
    out.append('\n// Lists of functions.\n')
    out.append('\nconst int32 max_order = %d;\n' % max_order)
    append_lists(out, names_lobatto, max_order + 1)
    append_lists(out, names_d_lobatto, max_order + 1)
    append_lists(out, names_kernel, max_order - 1)
    append_lists(out, names_d_kernel, max_order - 1)
    append_lists(out, names_legendre, max_order + 1)
    append_lists(out, names_d_legendre, max_order + 1)
    fd.write(template.replace('// REPLACE_TEXT', ''.join(out)))
    fd.close()