def METHOD_NAME(transaction: dict) -> messages.NEMTransactionCommon:
    msg = messages.NEMTransactionCommon(
        network=(transaction["version"] >> 24) & 0xFF,
        timestamp=transaction["timeStamp"],
        fee=transaction["fee"],
        deadline=transaction["deadline"],
    )
    if "signer" in transaction:
        msg.signer = bytes.fromhex(transaction["signer"])
    return msg