(inst2node, tree_node: List[Node])
return inst2node.mapValues(func)
get samples' weights which correspond to its node assignment
get samples' weights which correspond to its node assignment
get samples weights which correspond to its node assignment
def get_node_sample_weights(inst2node, tree_node: List[Node]):
        """
        get samples' weights which correspond to its node assignment
        """
        func = functools.partial(lambda inst, nodes: nodes[inst[1]].weight, nodes=tree_node)
        return inst2node.mapValues(func)
def get_node_sample_weights ( inst2node , tree_node : List [ Node ] ) : func = functools . partial ( lambda inst , nodes : nodes [ inst [ 1 ] ] . weight , nodes = tree_node ) return inst2node . mapValues ( func )