def goal_test(node):
    """Tests if goal is satisfied

    Args:
        node (dict): Node includes the representation for each state

    Returns:
        bool: True if goal is satisfied
    """
    for row in node['state']:
        if any(element != row[0] for element in row):
            return False
    return True