Modifies result's data according to the parametrization settings.

def setup_parametrization(result, parametrize):
    """Modifies result's data according to the parametrization settings."""
    if parametrize:
        # remove parameters from title
        title = result.get("title")
        if title:
            result["title"] = TEST_PARAM_RE.sub("", title)
    else:
        # don't parametrize if not specifically configured
        if "params" in result:
            del result["params"]