def METHOD_NAME(idf_py: IdfPyFunc,
                      should_be_rebuilt: Union[str, List[str]],
                      should_not_be_rebuilt: Union[str, List[str]]) -> None:
    """
    Helper function for the test cases below.
    Asserts that the files matching 'should_be_rebuilt' patterns are rebuilt
    and files matching 'should_not_be_rebuilt' patterns aren't, after
    touching (updating the mtime) of the given 'file_to_touch' and rebuilding.
    """
    snapshot_should_be_rebuilt = get_snapshot(should_be_rebuilt)
    snapshot_should_not_be_rebuilt = get_snapshot(should_not_be_rebuilt)
    idf_py('build')
    snapshot_should_be_rebuilt.assert_different(get_snapshot(should_be_rebuilt))
    snapshot_should_not_be_rebuilt.assert_same(get_snapshot(should_not_be_rebuilt))