def _commutes_(self, other: Any, *, atol: float = 1e-8) -> bool | NotImplementedType:
        """Determines whether Moment commutes with the other Moment or Operation.

        Args:
            other: An Operation or Moment object to test for commutativity.
            atol: Absolute error tolerance. If all entries in v1@v2 - v2@v1
                have a magnitude less than this tolerance, v1 and v2 can be
                reported as commuting. Defaults to 1e-8.

        Returns:
            True: The Moment commutes with Moment or Operation OR they don't
                have shared qubits.
            False: The two values do not commute.
            NotImplemented: In case we don't know how to check this, e.g.
                the parameter type is not supported or commutativity cannot be
                determined.
        """
        if not isinstance(other, (ops.Operation, Moment)):
            return NotImplemented
        other_operations = other.operations if isinstance(other, Moment) else (other,)
        return raw_types._operations_commutes_impl(self.operations, other_operations, atol=atol)
Determines whether Moment commutes with the other Moment or Operation.

        Args:
            other: An Operation or Moment object to test for commutativity.
            atol: Absolute error tolerance. If all entries in v1@v2 - v2@v1
                have a magnitude less than this tolerance, v1 and v2 can be
                reported as commuting. Defaults to 1e-8.

        Returns:
            True: The Moment commutes with Moment or Operation OR they don't
                have shared qubits.
            False: The two values do not commute.
            NotImplemented: In case we don't know how to check this, e.g.
                the parameter type is not supported or commutativity cannot be
                determined.
        
cirq-core/cirq/circuits/moment.py