def get_int(self, key: cirq.MeasurementKey, index=-1) -> int:
        """Gets the integer corresponding to the measurement.

        The integer is determined by summing the qubit-dimensional basis value
        of each measured qubit. For example, if the measurement of qubits
        [q1, q0] produces [1, 0], then the corresponding integer is 2, the big-
        endian equivalent. If they are qutrits and the measurement is [2, 1],
        then the integer is 2 * 3 + 1 = 7.

        Args:
            key: The measurement key.
            index: If multiple measurements have the same key, the index
                argument can be used to specify which measurement to retrieve.
                Here `0` refers to the first measurement, and `-1` refers to
                the most recent.

        Raises:
            KeyError: If the key has not been used or if the index is out of
                bounds.
        """
Gets the integer corresponding to the measurement.

        The integer is determined by summing the qubit-dimensional basis value
        of each measured qubit. For example, if the measurement of qubits
        [q1, q0] produces [1, 0], then the corresponding integer is 2, the big-
        endian equivalent. If they are qutrits and the measurement is [2, 1],
        then the integer is 2 * 3 + 1 = 7.

        Args:
            key: The measurement key.
            index: If multiple measurements have the same key, the index
                argument can be used to specify which measurement to retrieve.
                Here `0` refers to the first measurement, and `-1` refers to
                the most recent.

        Raises:
            KeyError: If the key has not been used or if the index is out of
                bounds.
        
cirq-core/cirq/value/classical_data.py