code: def test_reorder_index():
      # The dataframe is created with ordering according to the y
      # variable. So the x index should be ordered acc. to y too
      p = ggplot(data, aes("reorder(x, x.index)", "y")) + geom_col()
      assert p == "reorder_index"
  
file_path: plotnine/tests/test_aes.py
imports: import numpy
  import pandas
  from plotnine import aes, after_stat, geom_col, geom_crossbar, geom_point, ggplot, scale_x_log10, scale_y_log10, stage, stat_bin_2d, stat_ecdf, stat_function
  from plotnine.mapping.aes import make_labels
label_desc: Use image node_id 2 for calling a global function with example usage: test_reorder_index() without return types