keras/src/tree/tree_api.py/map_shape_structure
def map_shape_structure(func, structure):
    """Variant of keras.tree.map_structure that operates on shape tuples."""
    return tree_impl.map_shape_structure(func, structure)