code: def test_ward_tree(self):
      iris = datasets.load_iris()
      df = pdml.ModelFrame(iris)
  
      result = df.cluster.ward_tree()
      expected = cluster.ward_tree(iris.data)
  
      self.assertEqual(len(result), 4)
      self.assert_numpy_array_almost_equal(result[0], expected[0])
      self.assertEqual(result[1], expected[1])
      self.assertEqual(result[2], expected[2])
      self.assertEqual(result[3], expected[3])
  
      connectivity = np.ones((len(df), len(df)))
      result = df.cluster.ward_tree(connectivity)
      expected = cluster.ward_tree(iris.data, connectivity)
  
      self.assert_numpy_array_almost_equal(result[0], expected[0])
      self.assertEqual(result[1], expected[1])
      self.assertEqual(result[2], expected[2])
      self.assert_numpy_array_almost_equal(result[3], expected[3])
  
imports: import pytest
  import numpy
  import sklearn.datasets
  import sklearn.cluster
  import sklearn.preprocessing
  import sklearn.metrics
  import pandas_ml
  import pandas_ml.util.testing
label_desc: Use image node_id 4 for calling the TestCluster obj's underlying member method code with example usage: obj.test_ward_tree() without return types