code: def _inplace_sort_by_id(unsorted_list):
      if not isinstance(unsorted_list, list):
          return
      sorted_list = [(i.get('@id'), i) for i in unsorted_list]
      sorted_list.sort()
      del unsorted_list[:]
      unsorted_list.extend([i[1] for i in sorted_list])