code: def test_fk_from_pk_local_draft():
      table_a = wandb.Table(
          columns=["id", "col_1"], data=[["1", "a"], ["2", "b"]]
      )
      table_a.set_pk("id")
  
      table = wandb.Table(
          columns=["fk", "col_2"],
          data=[[table_a.data[0][0], "c"], ["2", "d"]],
      )
      table.add_data("3", "c")
  
      # None should not be supported
      with pytest.raises(TypeError):
          table.add_data(None, "c")
  
      # Assert that the data in this column is valid, but also properly typed
      assert [row[0] for row in table.data] == ["1", "2", "3"]
      assert all(
          [
              row[0] is None
              or (row[0]._table == table_a and row[0]._col_name == "id")
              for row in table.data
          ]
      )
  
      table = wandb.Table(
          columns=["fk", "col_2"], data=[["1", "c"], ["2", "d"]]
      )
      table.add_data(table_a.data[0][0], "c")
      with pytest.raises(TypeError):
          table.add_data(None, "c")
  
      # Assert that the data in this column is valid, but also properly typed
      assert [row[0] for row in table.data] == ["1", "2", "1"]
      assert all(
          [
              row[0] is None
              or (row[0]._table == table_a and row[0]._col_name == "id")
              for row in table.data
          ]
      )
  
file_path: wandb/tests/pytest_tests/unit_tests/test_tables.py
imports: import datetime
  import numpy
  import pytest
  import wandb
label_desc: Use image node_id 6 for calling a global function with example usage: test_fk_from_pk_local_draft() without return types