```python
def row_keys(row: dict) -> list:
    """Return the names a row holds, in the order it holds them."""
    return list(row.keys())


def merge_rows(under: dict, over: dict) -> dict:
    """One row laid over another, the row above winning."""
    merged = over.copy()  # Use a copy to avoid modifying the original
    for key in row_keys(under):
        if key in merged:
            merged[key] = under[key]  # Use the value from under if both hold a name
    return merged
```