def fix_symbol(self, symbol, reverse=False):
if not self.symbol_mapping:<EOL><INDENT>return symbol<EOL><DEDENT>for old, new in self.symbol_mapping:<EOL><INDENT>if reverse:<EOL><INDENT>if symbol == new:<EOL><INDENT>return old<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if symbol == old:<EOL><INDENT>return new<EOL><DEDENT><DEDENT><DEDENT>return symbol<EOL>
In comes a moneywagon format symbol, and returned in the symbol converted
to one the service can understand.