def METHOD_NAME(dart_file, checked):
    out_file = dart_file + '.js'
    dart2js_path = os.path.join(dart_out_dir, 'dart-sdk', 'bin', 'dart2js')
    args = [dart2js_path, dart_file, '--library-root=sdk/', '-o%s' % out_file]
    if checked:
        args.append('--checked')
    call(args)
    return out_file