Helper function to convert parameters to a valid string, that can be used in a column name.
    Does the opposite which is used in the from_columns function.

    The parameters are sorted by their name and written out in the form

       <param name>_<param value>__<param name>_<param value>__ ...

    If a <param_value> is a string, this method will wrap it with parenthesis ", so "<param_value>"

    :param param: The dictionary of parameters to write out
    :type param: dict

    :return: The string of parsed parameters
    :rtype: str

def convert_to_output_format(param):
    """
    Helper function to convert parameters to a valid string, that can be used in a column name.
    Does the opposite which is used in the from_columns function.

    The parameters are sorted by their name and written out in the form

       <param name>_<param value>__<param name>_<param value>__ ...

    If a <param_value> is a string, this method will wrap it with parenthesis ", so "<param_value>"

    :param param: The dictionary of parameters to write out
    :type param: dict

    :return: The string of parsed parameters
    :rtype: str
    """

    def add_parenthesis_if_string_value(x):
        if isinstance(x, string_types):
            return '"' + str(x) + '"'
        else:
            return str(x)

    return "__".join(str(key) + "_" + add_parenthesis_if_string_value(param[key]) for key in sorted(param.keys()))