def MapColoringCSP(colors, neighbors):
if isinstance(neighbors, str):<EOL><INDENT>neighbors = parse_neighbors(neighbors)<EOL><DEDENT>return CSP(list(neighbors.keys()), UniversalDict(colors), neighbors,<EOL>different_values_constraint)<EOL>
Make a CSP for the problem of coloring a map with different colors
    for any two adjacent regions.  Arguments are a list of colors, and a
    dict of {region: [neighbor,...]} entries.  This dict may also be
    specified as a string of the form defined by parse_neighbors.