def METHOD_NAME(dir_name):
    pp.RandomGenerator.get().set_seed(0)
    with open(dir_name + "Mupair_rho.txt", "w") as file:
        particle = pp.particle.MuMinusDef()
        for medium in mediums:
            for v in vs:
                # the constructors have not yet been pybinded
                # for param in params:
                param = pp.secondaries.make_secondary(
                    pp.particle.Interaction_Type.mupair, particle, medium)
                buf = [""]
                for energy in energies:
                    rnd1 = pp.RandomGenerator.get().random_double()
                    rnd2 = pp.RandomGenerator.get().random_double()
                    rho = param.calculate_rho(
                        energy, v, medium.components[0], rnd1, rnd2)
                    E1 = 0.5 * v * energy * (1 + rho)
                    E2 = 0.5 * v * energy * (1 - rho)
                    buf.append(particle.name)
                    buf.append(medium.name)
                    buf.append(str(v))
                    buf.append(str(energy))
                    buf.append(str(rnd1))
                    buf.append(str(rnd2))
                    buf.append(str(E1))
                    buf.append(str(E2))
                    buf.append("\n")
                file.write("\t".join(buf))