code: def insert(self, index, key):
      
      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
docs: Adds an element at a dedicated position in an OrderedSet.
  
      This implementation is meant for the OrderedSet from the ordered_set
      package only.