def _convert_metric(v10_metric_dict):
    """Upgrades a v10 metric object to a v11 metric object.

    Specifcally the following properties change
    1. metric.filter
    2. metric.type_params.measure.filter
    3. metric.type_params.input_measures[x].filter
    4. metric.type_params.numerator.filter
    5. metric.type_params.denominator.filter
    6. metric.type_params.metrics[x].filter"
    """

    # handles top level metric filter
    _convert_dct_with_filter(v10_metric_dict)

    type_params = v10_metric_dict.get("type_params")
    if type_params is not None:
        _convert_dct_with_filter(type_params.get("measure"))
        _convert_dct_with_filter(type_params.get("numerator"))
        _convert_dct_with_filter(type_params.get("denominator"))

        # handles metric.type_params.input_measures[x].filter
        input_measures = type_params.get("input_measures")
        if input_measures is not None:
            for input_measure in input_measures:
                _convert_dct_with_filter(input_measure)

        # handles metric.type_params.metrics[x].filter
        metrics = type_params.get("metrics")
        if metrics is not None:
            for metric in metrics:
                _convert_dct_with_filter(metric)
Upgrades a v10 metric object to a v11 metric object.

    Specifcally the following properties change
    1. metric.filter
    2. metric.type_params.measure.filter
    3. metric.type_params.input_measures[x].filter
    4. metric.type_params.numerator.filter
    5. metric.type_params.denominator.filter
    6. metric.type_params.metrics[x].filter"
    
core/dbt/artifacts/schemas/upgrades/upgrade_manifest.py