code: def _mergemap(map1, map2):
      
      merged = array('i', [0] * len(map2))
      for i, shift in enumerate(map2):
          merged[i] = shift + map1[i + shift]
      return merged
docs: Positions in map2 have an integer indicating the relative shift to
      the equivalent position in map1. E.g., the i'th position in map2
      corresponds to the i + map2[i] position in map1.