def save_monomial_index(filename, monomial_index):
monomial_translation = ['<STR_LIT>'] * (len(monomial_index) + <NUM_LIT:1>)<EOL>for key, k in monomial_index.items():<EOL><INDENT>monomial_translation[k] = convert_monomial_to_string(key)<EOL><DEDENT>file_ = open(filename, '<STR_LIT:w>')<EOL>for k in range(len(monomial_translation)):<EOL><INDENT>file_.write('<STR_LIT>' % (k, monomial_translation[k]))<EOL><DEDENT>file_.close()<EOL>
Save a monomial dictionary for debugging purposes.

    :param filename: The name of the file to save to.
    :type filename: str.
    :param monomial_index: The monomial index of the SDP relaxation.
    :type monomial_index: dict of :class:`sympy.core.expr.Expr`.