def token_id(s: str) -> int:
        """Computes the index of s in the string table diff.strs."""
        idx = len(diff.strs)
        diff.strs.append(s)
        return idx
Computes the index of s in the string table diff.strs.
cirq-google/cirq_google/api/v2/run_context.py