'Returns a dict of the modifications grouped by variable name
Returns:
dict mapping the environment variable name to the modifications to
be done on it'

def group_by_name(self):

    modifications = collections.defaultdict(list)
    for item in self:
        modifications[item.name].append(item)
    return modifications
