def METHOD_NAME(name: str, expected: float, data: tp.Optional[np.ndarray]) -> None:
    if name == "morpho" and os.environ.get("CIRCLECI", False):
        raise SkipTest("Too slow in CircleCI")
    size = data.size if data is not None else (16 if name != "morpho" else 4)
    photo = core.Photonics(name, size)
    if data is None:
        x = np.random.RandomState(12).normal(0, 1, size=size)
        candidate = photo.parametrization.spawn_child().set_standardized_data(x)
    else:
        candidate = photo.parametrization.spawn_child(new_value=data)
    np.testing.assert_almost_equal(photo(candidate.value), expected, decimal=4)
    np.testing.assert_almost_equal(photo.evaluation_function(candidate), expected, decimal=4)