def METHOD_NAME(type_str, input_file, output_file, dest, dest_type):
    api_checks = ''
    func_calls = ''
    TEST_NAME_OP = TEST_NAME + '_as_convert_to_' + dest
    for size in Data.standard_sizes:
        api_checks += gen_optional_checks(type_str, size, dest, dest_type, TEST_NAME_OP)
        func_calls += make_func_call(TEST_NAME_OP, type_str, str(size))
    write_source_file(api_checks, func_calls, TEST_NAME_OP, input_file,
                    output_file.replace('.cpp','_as_convert_to_'+dest+'.cpp'), type_str)