def get_share_qparams_ops(backend_config: _BackendConfig):
    """
    Returns list of ops which share qparams with input.
    """

    configs = (
        backend_config._pattern_complex_format_to_config
        if _is_torch_2()
        else backend_config.configs
    )

    return [
        op
        for op in configs
        if configs[op].observation_type == _ObservationType.OUTPUT_SHARE_OBSERVER_WITH_INPUT
    ]

    Returns list of ops which share qparams with input.
    
coremltools/optimize/torch/quantization/_utils.py