code: def data_to_table(data: np.ndarray, x_data: np.ndarray):
      table = []
  
      for i in range(data.shape[0]):
          if len(data.shape) == 2:  # Distribution
              m = data.shape[1] // 2
              row = {"x": x_data[i, m], "y": data[i, m]}
          else:
              row = {"x": x_data[i], "y": data[i]}
          table.append(row)
  
      return alt.Data(values=table)
  
imports: from typing import List
  import altair
  import numpy
  from labml.internal.analytics.altair.utils import TABLEAU_10
label_desc: Use image node_id 1 for calling a global function with example usage: data_to_table(data, x_data) and returns: alt