code: def index_natsorted(seq, key=lambda x: x, number_type=float, signed=True, exp=True):
      from operator import itemgetter
      item1 = itemgetter(1)
      index_seq_pair = [[x, key(y)] for x, y in zip(range(len(seq)), seq)]
      index_seq_pair.sort(key=lambda x: natsort_key(item1(x),
                                                    number_type=number_type,
                                                    signed=signed, exp=exp))
      return [x[0] for x in index_seq_pair]