<｜begin▁of▁sentence｜>### Instruction:
Given a rectangle represented by a bounding box, how do you change its center to a new Y coordinate without altering the box's width or height?
### Response:
from matplotlib.transforms import Bbox

# Assuming we have a bounding box 'bbox'
bbox = Bbox.from_bounds(1, 1, 10, 5)

# Set the midy (middle Y coordinate) of the bounding box to 10
bbox.midy = 10

# Print the updated bounding box to show change
echo bbox
<|EOT|>
