@staticmethod
    def create_new(pdus, **kwargs):
        if "origin_server_ts" not in kwargs:
            raise KeyError(
                "Require 'origin_server_ts' to construct a Transaction"
            )
        if "transaction_id" not in kwargs:
            raise KeyError(
                "Require 'transaction_id' to construct a Transaction"
            )

        for p in pdus:
            p.transaction_id = kwargs["transaction_id"]

        kwargs["pdus"] = [p.get_pdu_json() for p in pdus]

        return Transaction(**kwargs)
Used to create a new transaction. Will auto fill out
dataset/ETHPy150Open matrix-org/synapse/synapse/federation/units.py/Transaction.create_new