code: def make_number_formatter(decimal_places, add_ellipsis=False):
      """
      Given a number of decimal places creates a formatting string that will
      display numbers with that precision.
  
      :param decimal_places:
          The number of decimal places
      :param add_ellipsis:
          Optionally add an ellipsis symbol at the end of a number
      """
      fraction = "0" * decimal_places
      ellipsis = (
          config.get_option("number_truncation_chars")
          if add_ellipsis
          else ""
      )
      return "".join(
          ["#,##0.", fraction, ellipsis, ";-#,##0.", fraction, ellipsis]
      )
  
imports: import math
  import string
  from collections import OrderedDict
  from collections.abc import Sequence
  from decimal import ROUND_CEILING, ROUND_FLOOR, Decimal, getcontext
  from functools import wraps
  from slugify import slugify
  from agate import config
  from agate.warns import warn_duplicate_column, warn_unnamed_column
label_desc: Use image node_id 4 for calling a global function with example usage: make_number_formatter(decimal_places, add_ellipsis) and returns: str