ps,  global_NSTR
    global_model = model
    global_steps = steps
    global_NSTR = NSTR

def task(seed):
    &#39;&#39;&#39;
    Helper function for parallelization

    Parameters:
    seed: An integer seed for random number generation to ensure reproducibility.

    Returns:
    A tuple containing the function &#39;m&#39; output and the median dissonance distribution for a sample.
    &#39;&#39;&#39;
    s=qsample(global_NSTR, global_model, steps=global_steps)
    return funcm(s,global_model),dissonance