code: def test_type_invariance(dtype, WeightVector):
      """Check the `dtype` consistency of `WeightVector`."""
      weights = np.random.rand(100).astype(dtype)
      average_weights = np.random.rand(100).astype(dtype)
  
      weight_vector = WeightVector(weights, average_weights)
  
      assert np.asarray(weight_vector.w).dtype is np.dtype(dtype)
      assert np.asarray(weight_vector.aw).dtype is np.dtype(dtype)
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_type_invariance(dtype, WeightVector) without return types