code: def _format_callbacks(cb):
      """helper function for Future.__repr__"""
      size = len(cb)
      if not size:
          cb = ""
  
      def format_cb(callback):
          return format_helpers._format_callback_source(callback, ())
  
      if size == 1:
          cb = format_cb(cb[0][0])
      elif size == 2:
          cb = "{}, {}".format(format_cb(cb[0][0]), format_cb(cb[1][0]))
      elif size > 2:
          cb = "{}, <{} more>, {}".format(
              format_cb(cb[0][0]), size - 2, format_cb(cb[-1][0])
          )
      return f"cb=[{cb}]"
  
imports: import reprlib
  from .None import format_helpers
label_desc: Use image node_id 2 for calling a global function with example usage: _format_callbacks(cb) and returns: str, cb, str, format_helpers