def METHOD_NAME(num, grouping=True):
    # set locale for currency filter
    locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
    to_return = None
    if isinstance(num, (int, float)):
        to_return = locale.currency(round(num), grouping=grouping)
        return to_return[:-3]
    return to_return