def parse(self, value, decimal=None):
<EOL>value = value or <NUM_LIT:0><EOL>if check_type(value, '<STR_LIT:list>'):<EOL><INDENT>return map(lambda val: self.parse(val, decimal))<EOL><DEDENT>if check_type(value, '<STR_LIT:int>') or check_type(value, '<STR_LIT:float>'):<EOL><INDENT>return value<EOL><DEDENT>decimal = decimal or self.settings.number.decimal<EOL>regex = re.compile("<STR_LIT>" + decimal + "<STR_LIT:]>")<EOL>unformatted = str(value)<EOL>unformatted = re.sub('<STR_LIT>', "<STR_LIT>", unformatted)<EOL>unformatted = re.sub(regex, '<STR_LIT>', unformatted)<EOL>unformatted = unformatted.replace('<STR_LIT:.>', decimal)<EOL>formatted = (lambda val: unformatted if val else <NUM_LIT:0>)(<EOL>is_num(unformatted))<EOL>return formatted<EOL>
Summary.

 Takes a string/array of strings, removes all formatting/cruft and
 returns the raw float value

 Decimal must be included in the regular expression to match floats
  (defaults to Accounting.settings.number.decimal),
  so if the number uses a non-standard decimal
 separator, provide it as the second argument.
 *
 Also matches bracketed negatives (eg. "$ (1.99)" => -1.99)

 Doesn't throw any errors (`None`s become 0) but this may change

Args:
    value (TYPE): Description
    decimal (TYPE): Description

Returns:
    name (TYPE): Description