docstr: For #15908
docstr_tok: ["For","#","15908"]
code: def test_parallel_coordinates_with_sorted_labels(self):
      """For #15908"""
      from pandas.plotting import parallel_coordinates
  
      df = DataFrame(
          {
              "feat": list(range(30)),
              "class": [2 for _ in range(10)]
              + [3 for _ in range(10)]
              + [1 for _ in range(10)],
          }
      )
      ax = parallel_coordinates(df, "class", sort_labels=True)
      polylines, labels = ax.get_legend_handles_labels()
      color_label_tuples = zip(
          [polyline.get_color() for polyline in polylines], labels
      )
      ordered_color_label_tuples = sorted(
          color_label_tuples, key=lambda x: x[1]
      )
      prev_next_tupels = zip(
          list(ordered_color_label_tuples[0:-1]),
          list(ordered_color_label_tuples[1:]),
      )
      for prev, nxt in prev_next_tupels:
          # labels and colors are ordered strictly increasing
          assert prev[1] < nxt[1] and prev[0] < nxt[0]
  
imports: import os
  import numpy
  import pytest
  import pandas.util._test_decorators
  from pandas import DataFrame, Index, Series, Timestamp, date_range, interval_range, period_range, plotting, read_csv
  import pandas._testing
  from pandas.tests.plotting.common import _check_colors, _check_legend_labels, _check_plot_works, _check_text_labels, _check_ticks_props
label_desc: Use image node_id 11 for calling the TestDataFramePlots obj's underlying member method code with example usage: obj.test_parallel_coordinates_with_sorted_labels() without return types