def METHOD_NAME(network, bin_centers, bin_heights, element='pore'):
    r"""
    Generate values corresponding to a given histogram
    Parameters
    ----------
    %(network)s
    bin_centers : array_like
        The x-axis of the histogram, such as pore sizes.
    bin_heights : array_like
        The y-axis of the histogram, such as the number of pores of each size.
    element : str
        Controls how many values to generate. Can either be 'pore' or 'throat'.
    Returns
    -------
    values : ndarray
        Values corresponding to ``bin_centers`` generated in proportion to the
        respective ``bin_heights``.
    """
    N = network._count(element)
    h = np.cumsum(bin_heights)
    b = np.digitize(np.random.rand(N)*np.amax(h), bins=h)
    vals = np.array(bin_centers)[b]
    return vals