def regional_probability_map(graph, xxx_todo_changeme):
    r"""
    Regional term based on a probability atlas.
    
    An implementation of a regional term, suitable to be used with the
    `~medpy.graphcut.generate.graph_from_voxels` function.
    
    Takes an image/graph/map as input where each entry contains a probability value for
    the corresponding GC graph node to belong to the foreground object. The probabilities
    must be in the range :math:`[0, 1]`. The reverse weights are assigned to the sink
    (which corresponds to the background).
    
    Parameters
    ----------
    graph : GCGraph
        The graph to add the weights to.
    probability_map : ndarray
        The label image.
    alpha : float
        The energy terms alpha value, balancing between boundary and regional term.
    
    Notes
    -----
    This function requires a probability atlas image of the same shape as the original image
    to be passed along. That means that `~medpy.graphcut.generate.graph_from_labels` has to
    be called with ``regional_term_args`` set to the probability atlas image.
    """
    (probability_map, alpha) = xxx_todo_changeme
    probability_map = scipy.asarray(probability_map)
    probabilities = numpy.vstack([(probability_map * alpha).flat,
                                  ((1 - probability_map) * alpha).flat]).T
    graph.set_tweights_all(probabilities)