def format(self, number, **kwargs):
<EOL>if check_type(number, '<STR_LIT:list>'):<EOL><INDENT>return map(lambda val: self.format(val, **kwargs))<EOL><DEDENT>number = self.parse(number)<EOL>if check_type(kwargs, '<STR_LIT>'):<EOL><INDENT>options = (self.settings['<STR_LIT>'].update(kwargs))<EOL><DEDENT>precision = self._change_precision(options['<STR_LIT>'])<EOL>negative = (lambda num: "<STR_LIT:->" if num < <NUM_LIT:0> else "<STR_LIT>")(number)<EOL>base = str(int(self.to_fixed(abs(number) or <NUM_LIT:0>, precision)), <NUM_LIT:10>)<EOL>mod = (lambda num: len(num) % <NUM_LIT:3> if len(num) > <NUM_LIT:3> else <NUM_LIT:0>)(base)<EOL>num = negative + (lambda num: base[<NUM_LIT:0>:num] if num else '<STR_LIT>')(mod)<EOL>num += re.sub('<STR_LIT>', '<STR_LIT>' +<EOL>options['<STR_LIT>'], base[mod:])<EOL>num += (lambda val: options[<EOL>'<STR_LIT>'] + self.to_fixed(abs(number), precision)<EOL>.split('<STR_LIT:.>')[<NUM_LIT:1>] if val else '<STR_LIT>')(precision)<EOL>return num<EOL>
Format a given number.

        Format a number, with comma-separated thousands and
        custom precision/decimal places

        Localise by overriding the precision and thousand / decimal separators
        2nd parameter `precision` can be an object matching `settings.number`

        Args:
            number (TYPE): Description
            precision (TYPE): Description
            thousand (TYPE): Description
            decimal (TYPE): Description

        Returns:
            name (TYPE): Description