code: def cols_to_rows(
      example_data: Dict[str, List[float]],
  ) -> Tuple[List[str], List[List[float]]]:
      headers = list(example_data.keys())
      n_rows = max(
          len(example_data[header] or []) for header in headers
      )
      data = []
      for row_index in range(n_rows):
          row_data = []
          for header in headers:
              col = example_data[header] or []
              if row_index >= len(col):
                  row_data.append("NaN")
              else:
                  row_data.append(col[row_index])
          data.append(row_data)
      return headers, data
  
file_path: gradio/gradio/external_utils.py
imports: import base64
  import math
  import operator
  import re
  import warnings
  from typing import Dict, List, Tuple
  import httpx
  import yaml
  from gradio import components
label_desc: Use image node_id 2 for calling a global function with example usage: cols_to_rows(example_data) and returns: headers,  data