Implementation of `SupportsApproximateEquality` protocol.

def _approx_eq_(self, other: Any, atol: float) -> bool:
        """Implementation of `SupportsApproximateEquality` protocol."""
        if not isinstance(other, type(self)):
            return NotImplemented

        #self.value = value % period in __init__() creates a Mod
        if isinstance(other.value, sympy.Mod):
            return self.value == other.value
        # Periods must be exactly equal to avoid drift of normalized value when
        # original value increases.
        if self.period != other.period:
            return False

        low = min(self.value, other.value)
        high = max(self.value, other.value)

        # Shift lower value outside of normalization interval in case low and
        # high values are at the opposite borders of normalization interval.
        if high - low > self.period / 2:
            low += self.period

        return cirq.protocols.approx_eq(low, high, atol=atol)