<｜begin▁of▁sentence｜>### Instruction:
Given a 2x2 matrix, how do you update the first row with new values and then update the value of the bottom-right cell?
### Response:
from networkx.linalg import Matrix
def update_matrix(matrix, i, value):
    matrix[i] = value
    return matrix

# Example usage:
m = Matrix([[1, 2], [3, 4]])
# Update the first row
update_matrix(m, 0, [5, 6])
print(m)
# Update a single item in the matrix
update_matrix(m, (1, 1), 9)
print(m)
<|EOT|>
