def METHOD_NAME(tmpdir, datasets_o, datasets_m):
    nn.clear_parameters()
    ctx = get_extension_context(
        'cpu', device_id=0, type_config='float')
    nn.set_default_context(ctx)
    batch_size = 64
    x = nn.Variable([batch_size, 1, 28, 28])
    Affine = PF.affine(x, 1, name='Affine')
    Sigmoid = F.sigmoid(Affine)
    target = nn.Variable([batch_size, 1])
    target.data.fill(1)
    BinaryCrossEntropy = F.binary_cross_entropy(Sigmoid, target)
    solver = S.Adam()
    solver.set_parameters(nn.get_parameters())
    solver.set_learning_rate(5e-4)
    contents = {
        'global_config': {
            'default_context': ctx
        },
        'training_config': {
            'max_epoch': 100,
            'iter_per_epoch': 23,
            'save_best': True,
            'monitor_interval': 10
        },
        'networks': [
            {
                'name': 'Main',
                'batch_size': batch_size,
                'outputs': {'BinaryCrossEntropy': BinaryCrossEntropy},
                'names': {'x': x}
            },
            {
                'name': 'MainValidation',
                'batch_size': batch_size,
                'outputs': {'BinaryCrossEntropy': BinaryCrossEntropy},
                'names': {'x': x}
            },
            {
                'name': 'MainRuntime',
                'batch_size': batch_size,
                'outputs': {'Sigmoid': Sigmoid},
                'names': {'x': x}
            }
        ],
        'datasets': [
            {
                'name': 'dataset1',
                'uri': 'DATASET_TRAINING1',
                'cache_dir': 'here_it_is',
                'shuffle': True,
                'batch_size': batch_size,
                'no_image_normalization': False,
                'variables': {'x': x, 'BinaryCrossEntropy': BinaryCrossEntropy}
            },
            {
                'name': 'dataset2',
                'uri': 'DATASET_TRAINING2',
                'cache_dir': 'here_it_is',
                'shuffle': True,
                'batch_size': batch_size,
                'no_image_normalization': False,
                'variables': {'x': x, 'BinaryCrossEntropy': BinaryCrossEntropy},
            }
        ],
        'optimizers': [
            {
                'name': 'optimizer',
                'solver': solver,
                'network': 'Main',
                'dataset': datasets_o,
                'weight_decay': 0,
                'lr_decay': 1,
                'lr_decay_interval': 1,
                'update_interval': 1
            }
        ],
        'monitors': [
            {
                'name': 'train_error',
                'network': 'MainValidation',
                'dataset': datasets_m
            },
            {
                'name': 'valid_error',
                'network': 'MainValidation',
                'dataset': datasets_m
            }
        ],
        'executors': [
            {
                'name': 'Executor',
                'network': 'MainRuntime',
                'data': ['x'],
                'output': ['Sigmoid']
            }
        ]
    }
    tmpdir.ensure(dir=True)
    tmppath = tmpdir.join('testsave.nnp')
    nnp_file = tmppath.strpath
    nnabla.utils.save.save(nnp_file, contents)
    nnabla.utils.load.load([nnp_file])