def METHOD_NAME(transform: dict,
                        is_classification: bool,
                        target: str,
                        categorical_features: List[str],
                        metric_features: List[str]):
    '''
    Generates the parameters for an experiment or None if it is not valid.
    '''
    if needs_metric_features(transform['transform_name']) and len(metric_features) == 0:
        return None
    if needs_categorical_features(transform['transform_name']) and len(categorical_features) == 0:
        return None
    if regression_only(transform['transform_name']) and is_classification:
        return None
    result = copy.deepcopy(transform['transform_parameters'])
    if 'fraction' in result:
        result['fraction'] = round(random.uniform(0.1, 0.9), 2)
    if 'magnitude' in result:
        result['magnitude'] = round(random.uniform(0.1, 0.9), 2)
    if 'metric_features' in result:
        if len(metric_features) > 0:
            result['metric_features'] = random.sample(
                metric_features, k=random.randint(1, min(len(metric_features), 4)))
    if 'categorical_features' in result:
        if len(categorical_features) > 0:
            result['categorical_features'] = categorical_features
    if 'target' in result:
        result['target'] = target
    return result