code: def test_cols_to_rows():
      assert cols_to_rows({"a": [1, 2, "NaN"], "b": [1, "NaN", 3]}) == (
          ["a", "b"],
          [[1, 1], [2, "NaN"], ["NaN", 3]],
      )
      assert cols_to_rows(
          {"a": [1, 2, "NaN", 4], "b": [1, "NaN", 3]}
      ) == (
          ["a", "b"],
          [[1, 1], [2, "NaN"], ["NaN", 3], [4, "NaN"]],
      )
      assert cols_to_rows(
          {"a": [1, 2, "NaN"], "b": [1, "NaN", 3, 5]}
      ) == (
          ["a", "b"],
          [[1, 1], [2, "NaN"], ["NaN", 3], ["NaN", 5]],
      )
      assert cols_to_rows({"a": None, "b": [1, "NaN", 3, 5]}) == (
          ["a", "b"],
          [["NaN", 1], ["NaN", "NaN"], ["NaN", 3], ["NaN", 5]],
      )
      assert cols_to_rows({"a": None, "b": None}) == (["a", "b"], [])
  
imports: import os
  import tempfile
  import textwrap
  import warnings
  from pathlib import Path
  from unittest.mock import MagicMock, patch
  import pytest
  from fastapi.testclient import TestClient
  from gradio_client import media_data
  from huggingface_hub import HfFolder
  import gradio
  from gradio.context import Context
  from gradio.exceptions import GradioVersionIncompatibleError, InvalidApiNameError
  from gradio.external import TooManyRequestsError, cols_to_rows, get_tabular_examples
label_desc: Use image node_id 2 for calling a global function with example usage: test_cols_to_rows() without return types