def METHOD_NAME(metafunc):
    """Hooks into pytest to add platform and board fixtures to tests that
    require them. To make sure that "platform" and "board" are treated as
    parameters for the appropriate tests (and included in the test names),
    we add them as function level parametrizations. This prevents data
    from being overwritten in Junit XML files if multiple platforms
    or boards are tested."""
    for argument in ["platform", "board"]:
        if argument in metafunc.fixturenames:
            value = metafunc.config.getoption(f"--{argument}", default=None)
            if not value:
                raise ValueError(
                    f"Test {metafunc.function.__name__} in module {metafunc.module.__name__} "
                    f"requires a --{argument} argument, but none was given."
                )
            metafunc.parametrize(argument, [metafunc.config.getoption(f"--{argument}")])