def METHOD_NAME(self, bindings):
    # Set from:
    # { key1: action1, key2: action1, ... keyn: actionn }
    mappings = defaultdict(list)
    for key, action in dict(bindings).items():
        mappings[action].append(key)
    self.set_mappings(mappings)