code: def _sort_row_col_lists(rows, cols):
      # makes sure that row and column lists are compared in the same order
      # sorted on rows
      si = sorted(range(len(rows)), key=lambda i: rows[i])
      rows = [rows[i] for i in si]
      cols = [cols[i] for i in si]
      return (rows, cols)
  
file_path: plotly.py/packages/python/plotly/plotly/tests/test_core/test_update_objects/test_row_col_subplot_addressing.py
imports: import plotly.graph_objs
  from plotly.subplots import make_subplots
  from plotly.basedatatypes import _indexing_combinations
  import pytest
  from itertools import product
label_desc: Use image node_id 7 for calling a global function with example usage: _sort_row_col_lists(rows, cols) and returns: rows,  cols