How would you structure tests using the Page Object Model?
Implement a function that converts ordered UI interactions into page object definitions, grouping locators and reusable action methods by page.
Input steps contain page, element, locator, and action; return an insertion-ordered dictionary mapping each page to its locators and unique method names.
def build_page_objects(steps):