def make_path2loc(lgrps):
    """ Set path2loc to map each path in lgrps (location groups) to
    the id of the location group associated with that path.  Input is:
    lgrps = { 'loc1': [ 'path1', 'path2', ...]; 'loc2': ['path3', ...], ...}
    Return is a dictionary of form:
    { 'path1': 'loc1', 'path2': 'loc1', 'path3': loc2', ... }"""
    path2loc = {}
    for loc in lgrps:
        for path in lgrps[loc]:
            path2loc[path] = loc
    return path2loc