code: def test_weighted_weights_setter():
      new_weighted = weighted.MultiObjectiveWeightedFunction([], [])
  
      try:
          new_weighted.weights = None
      except:
          new_weighted.weights = []
  
      try:
          new_weighted.weights = [1.0]
      except:
          new_weighted.weights = []
  
      assert len(new_weighted.weights) == 0
  
label_desc: Use image node_id 2 for calling a global function with example usage: test_weighted_weights_setter() without return types