The submodule from the scipy package is called scipy.cluster. With the following code, we can find all embedded functions. The document for this submodule is available here at https://docs.scipy.org/doc/scipy/reference/cluster.hierarchy.html:
import scipy.cluster as cluster x=dir(cluster) print(x)
The next screenshot shows the related output:

First, we use the scipy.cluster._hierarchy function. This example is borrowed as well (https://stackoverflow.com/questions/21638130/tutorial-for-scipy-cluster-hierarchy). The code is shown here:
import numpy as np import matplotlib.pyplot as plt import scipy.cluster.hierarchy as hac a = np.array([[0.11, 2.5],[1.45, 0.40], [0.3, 1.1],[0.9 , 0.8], [0.5, 0.01],[0.1 , 0.5], [0.6, 0.5],[2.6, 2.1], [2.3, 3.2],[3.1, 2.2], ...