<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def format_grammar_string(grammar_dictionary: Dict[str, List[str]]) -> str: """ Formats a dictionary of production rules into the string format expected by the Parsimonious Grammar class. """

    grammar_string = '\n'.join([f"{nonterminal} = {' / '.join(right_hand_side)}"
                                for nonterminal, right_hand_side in grammar_dictionary.items()])
    return grammar_string.replace("\\", "\\\\")