def METHOD_NAME(self, layout, expected):
    casted_layout = {}
    for name, (shape, dir) in layout.items():
        casted_layout[name] = (Shape.cast(shape), dir)
    self.assertEqual(casted_layout, expected)