code: def unpack_unordered_pairs(self, pairs):
          
  
          items = [(False, k, v) for k, v in pairs]
          result = []
  
          # Try to unpack items more than one time to resolve cross references
          max_loop = 2
          while items and max_loop:
              next_items = []
              for key_unpacked, key_data, value_data in items:
                  if key_unpacked:
                      key = key_data
                  else:
                      blob = self._begin()
                      try:
                          # Try unpacking the key
                          key = self.unpack_data(key_data)
                          self._commit(blob)
                      except DelayPacking:
                          self._rollback(blob)
                          # If it is delayed keep it for later
                          next_items.append((False, key_data, value_data))
                          continue
  
                  blob = self._begin()
                  try:
                      # try unpacking the value
                      value = self.unpack_data(value_data)
                      self._commit(blob)
                  except DelayPacking:
                      self._rollback(blob)
                      # If it is delayed keep it for later
                      next_items.append((True, key, value_data))
                      continue
  
                  # Update the container with the unpacked value and key
                  result.append((key, value))
              items = next_items
              max_loop -= 1
  
          if items:
              # Not all items were resolved
              raise DelayPacking()
  
          return result
docs: Unpack an unordered list of value pairs taking DelayPacking
          exceptions into account to resolve circular references .
          Used to unpack dictionary items when the order is not guarennteed
          by the serializer. When item order change between packing
          and unpacking, references are not guaranteed to appear before
          dereferences anymore. So if unpacking an item fail because
          of unknown dereference, we must keep it aside, continue unpacking
          the other items and continue later.