code: def test_bars(scales):
      # Create a Bar chart with data of multiple shapes should work with binary serialization
      y = np.array([[0, 1], [1, 0, -1]], dtype=object)
      bars = bqplot.Bars(x=[0, 1], y=y, scales=scales)
  
      bars = bqplot.Bars(x=[0, 1], y=[[1, 2], [3, 4]], scales=scales)
      state = bars.get_state()
  
      bars2 = bqplot.Bars(scales=scales)
      bars2.set_state(state)
      assert bars.x[0] == 0
      assert bars.x[1] == 1
      assert bars.y[0][0] == 1
      assert bars.y[0][1] == 2
      assert bars.y[1][0] == 3
      assert bars.y[1][1] == 4
  
imports: import bqplot
  import numpy
  import pytest
label_desc: Use image node_id 4 for calling a global function with example usage: test_bars(scales) without return types