code: def mli_sort_take(data, sort_indexes, reverse_results=False):
      if isinstance(data[0], list):
          out_list = []
          for j, data_instance in enumerate(data):
              if reverse_results:
                  out_list.append(
                      [
                          data_instance[i]
                          for i in reversed(sort_indexes[j])
                      ]
                  )
              else:
                  out_list.append(
                      [data_instance[i] for i in sort_indexes[j]]
                  )
          return out_list
      if reverse_results:
          return [data[i] for i in reversed(sort_indexes)]
      else:
          return [data[i] for i in sort_indexes]
  
imports: import plotly.graph_objs
  import numpy
  from plotly import subplots
  import matplotlib.pyplot
  from numbers import Number
  import logging
label_desc: Use image node_id 20 for calling a global function with example usage: mli_sort_take(data, sort_indexes, reverse_results) and returns: out_list, unknown, unknown