code: def test_upgrade_slice():
      slc = Slice(
          slice_name="FOO",
          viz_type="filter_box",
          params=json.dumps(dict(metric="foo", groupby=["bar"])),
      )
      upgrade_slice(slc)
      params = json.loads(slc.params)
      assert "metric" not in params
      assert "filter_configs" in params
  
      cfg = params["filter_configs"][0]
      assert cfg.get("metric") == "foo"
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_upgrade_slice() without return types