code: def _PreparedData(self, order_by=()):
      if not order_by:
        return self.__data
      sorted_data = self.__data[:]
      if isinstance(order_by, six.string_types) or (
          isinstance(order_by, tuple) and len(order_by) == 2 and
          order_by[1].lower() in ["asc", "desc"]):
        order_by = (order_by,)
      for key in reversed(order_by):
        if isinstance(key, six.string_types):
          sorted_data.sort(key=lambda x: x[0].get(key))
        elif (isinstance(key, (list, tuple)) and len(key) == 2 and
              key[1].lower() in ("asc", "desc")):
          key_func = lambda x: x[0].get(key[0])
          sorted_data.sort(key=key_func, reverse=key[1].lower() != "asc")
        else:
          raise DataTableException("Expected tuple with second value: "
                                   "'asc' or 'desc'")
      return sorted_data