@classmethod
    def from_string(cls, string):
        try:
            keys = string.split(cls._SEPARATOR)
            while len(keys) < len(cls._fields):
                # i.e. old token from before receipt_key
                keys.append("0")
            return cls(*keys)
        except:
            raise SynapseError(400, "Invalid Token")
dataset/ETHPy150Open matrix-org/synapse/synapse/types.py/StreamToken.from_string/original