def METHOD_NAME(testcase):
    check, partition, _ = testcase
    cls = type(check)
    def _rfm_set_valid_systems(obj):
        obj.valid_systems = [partition.fullname]
    return make_test(
        f'{cls.__name__}_{partition.fullname.replace(":", "_")}',
        (cls,),
        {
            'valid_systems': [partition.fullname],
            '$nid': builtins.parameter(
                [[n] for n in node_map[partition.fullname]],
                fmt=util.nodelist_abbrev
            )
        },
        methods=[
            builtins.run_before('run')(_rfm_pin_run_nodes),
            builtins.run_before('compile')(_rfm_pin_build_nodes),
            # We re-set the valid system in a hook to make sure that it
            # will not be overwritten by a parent post-init hook
            builtins.run_after('init')(_rfm_set_valid_systems),
        ]
    ), ['$nid']