def create_map_from_table(table):
    """Create a map from script code to cmap."""
    assert table.header[0:4] == "script,name,count,ranges".split(",")
    return {rd.script: rd for rd in table.rows}