Update node with pydgraph

Hello,

I created a schema:

schema = """id: int @index(int) .
                 question: string .
                 answer: string .
                 creation_time: int .
                 interval_time: int .
                 box_id: int .
                 
                 type Card {
                    id
                    question
                    answer
                    creation_time
                    interval_time
                    box_id
                 }"""

and created nodes:

txn = self.client.txn()
        for n in range(1000):
            card = {
                "uid": n,
                "id": n,
                "dgraph.type": "Card",
                "question": questions[n],
                "answers": answers[n],
                "creation_time": 1234567890,
                "interval_time": 1234567890,
                "box_id": 1
            }
            txn.mutate(set_obj=card)
txn.commit()
txn.discard()

How can I update the nodes?

Note their UIDs and use the key “uid”: “0xYZ” or use Upsert Block

For posterity sake: