def is_pytorch_defined_observer(observer: _aoquant.ObserverBase):
    """
    Returns True if provided observer instance is defined by PyTorch. Otherwise returns False.
    """

    checklist = (
        _aoquant.MinMaxObserver,
        _aoquant.PerChannelMinMaxObserver,
        _aoquant.MovingAverageMinMaxObserver,
        _aoquant.MovingAveragePerChannelMinMaxObserver,
        _aoquant.HistogramObserver,
        _aoquant.PlaceholderObserver,
        _aoquant.NoopObserver,
        _aoquant.FixedQParamsObserver,
    )
    return isinstance(observer, checklist)

    Returns True if provided observer instance is defined by PyTorch. Otherwise returns False.
    
coremltools/optimize/torch/quantization/_utils.py