code: def test_ports_should_have_unique_deltas(self):
      table = Table(data)
      port_ids = []
  
      for i in range(10):
          port_ids.append(table.make_port())
  
      assert port_ids == list(range(1, 11))
  
      view = table.view()
      ports_to_update = [random.randint(0, 10) for i in range(5)]
      unique_data = {
          port: [{"a": port, "b": str(port), "c": True}]
          for port in ports_to_update
      }
  
      def callback(port_id, delta):
          assert port_id in ports_to_update
          _t = Table(delta)
          _v = _t.view()
          assert _v.to_records() == unique_data[port]
          _v.delete()
          _t.delete()
  
      view.on_update(callback, mode="row")
  
      for port in ports_to_update:
          table.update(unique_data[port], port_id=port)
  
file_path: perspective/python/perspective/perspective/tests/table/test_ports.py
imports: import random
  from perspective.table import Table
label_desc: Use image node_id 5 for calling the TestPorts obj's underlying member method code with example usage: obj.test_ports_should_have_unique_deltas() without return types