code: def reshape_data(x, hue, labels):
      categories = list(sorted(set(hue), key=list(hue).index))
      x_stacked = np.vstack(x)
      x_reshaped = [[] for _ in categories]
      labels_reshaped = [[] for _ in categories]
      if labels is None:
          labels = [None] * len(hue)
      for idx, (point, label) in enumerate(zip(hue, labels)):
          x_reshaped[categories.index(point)].append(x_stacked[idx])
          labels_reshaped[categories.index(point)].append(labels[idx])
      return [np.vstack(i) for i in x_reshaped], labels_reshaped
  
imports: import functools
  import sys
  import numpy
  import copy
  from scipy.interpolate import PchipInterpolator
  import seaborn
  import itertools
  import pandas
  from matplotlib.lines import Line2D
label_desc: Use image node_id 10 for calling a global function with example usage: reshape_data(x, hue, labels) and returns: unknown,  labels_reshaped