<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def insert(self, index, key):
 """Adds an element at a dedicated position in an OrderedSet. This implementation is meant for the OrderedSet from the ordered_set package only. """

    if key in self.map:
        return
    # compute the right index
    size = len(self.items)
    if index < 0:
        index = size + index if size + index > 0 else 0
    else:
        index = index if index < size else size
    # insert the value
    self.items.insert(index, key)
    for k, v in self.map.items():
        if v >= index:
            self.map[k] = v + 1
    self.map[key] = index