def METHOD_NAME(self, filename):
    """write a csv file with the scenarios in the set
    Args:
        filename (str): full path and full name of file
    """
    if len(self._scens) == 0:
        print("Empty scenario set, not writing file={}".format(filename))
        return
    with open(filename, "w") as f:
        f.write("Name,Probability")
        for n in self._firstscen().ThetaVals.keys():
            f.write(",{}".format(n))
        f.write('\n')
        for s in self.ScensIterator():
            f.write("{},{}".format(s.name, s.probability))
            for v in s.ThetaVals.values():
                f.write(",{}".format(v))
            f.write('\n')