def contains(script, keywords):
    """Performs DFS on the script to determine if keyword exists."""

    # The keyword must be the first item in a list.
    if type(script) != list or not script:
        return False

    if script[0] in keywords:
        return True

    # Iterate over all children.
    return any(contains(child, keywords) for child in script)