code: def test_serialize_success():
      table = Table(column_names=feature_names)
      sample = data
      dict_data = table.serialize(sample)
      for d1, d2 in zip(sample.squeeze(), dict_data.values()):
          assert d2 == {0: d1.item()}
  
file_path: lightning-flash/tests/core/serve/test_types/test_table.py
imports: import pytest
  import torch
  from flash.core.serve.types import Table
  from flash.core.utilities.imports import _TOPIC_SERVE_AVAILABLE
label_desc: Use image node_id 1 for calling a global function with example usage: test_serialize_success() without return types