from typing import List


def do_materials_match(
    materials_1: List[str],
    materials_2: List[str],
    colors_1: List[str],
    colors_2: List[str]
) -> bool:
    """Returns whether the two given material lists match, or, if either of the
    given material lists are empty, returns whether the two given color lists
    overlap."""
    if materials_1 and materials_2:
        return materials_1 == materials_2
    return len(set(colors_1).intersection(set(colors_2))) > 0