def build_hypo_depth_dist(hdd):
    """
    Returns the hypocentral depth distribution as a Node instance

    :param hdd:
        Hypocentral depth distribution as an instance of :class:
        `openquake.hzardlib.pmf.PMF`
    :returns:
        Instance of :class:`openquake.baselib.node.Node`
    """
    hdds = []
    for (prob, depth) in hdd.data:
        hdds.append(
            Node("hypoDepth", {"depth": depth, "probability": prob}))
    return Node("hypoDepthDist", nodes=hdds)
def build_hypo_depth_dist ( hdd ) : hdds = [ ] for ( prob , depth ) in hdd . data : hdds . append ( Node ( "hypoDepth" , { "depth" : depth , "probability" : prob } ) ) return Node ( "hypoDepthDist" , nodes = hdds )
Returns the hypocentral depth distribution as a Node instance

    :param hdd:
        Hypocentral depth distribution as an instance of :class:
        `openquake.hzardlib.pmf.PMF`
    :returns:
        Instance of :class:`openquake.baselib.node.Node`