def METHOD_NAME(op):
    """Returns whether Cirq gate/operation is MeasurementGate."""
    return isinstance(op, ops.MeasurementGate) or isinstance(
        getattr(op, "gate", None), ops.MeasurementGate
    )