code: def boolean_flag(name, configurable, set_help="", unset_help=""):
      """Helper for building basic --trait, --no-trait flags.
  
      Parameters
      ----------
  
      name : str
          The name of the flag.
      configurable : str
          The 'Class.trait' string of the trait to be set/unset with the flag
      set_help : unicode
          help string for --name flag
      unset_help : unicode
          help string for --no-name flag
  
      Returns
      -------
  
      cfg : dict
          A dict with two keys: 'name', and 'no-name', for setting and unsetting
          the trait, respectively.
      """
      # default helpstrings
      set_help = set_help or "set %s=True" % configurable
      unset_help = unset_help or "set %s=False" % configurable
  
      cls, trait = configurable.split(".")
  
      setter = {cls: {trait: True}}
      unsetter = {cls: {trait: False}}
      return {
          name: (setter, set_help),
          "no-" + name: (unsetter, unset_help),
      }
  
imports: from __future__ import print_function
  from copy import deepcopy
  import json
  import logging
  import os
  import re
  import sys
  from collections import defaultdict, OrderedDict
  from decorator import decorator
  from traitlets.config.configurable import Configurable, SingletonConfigurable
  from traitlets.config.loader import KVArgParseConfigLoader, PyFileConfigLoader, Config, ArgumentError, ConfigFileNotFound, JSONFileConfigLoader
  from traitlets.traitlets import Bool, Unicode, List, Enum, Dict, Instance, TraitError, observe, observe_compat, default
  from ipython_genutils.importstring import import_item
  from ipython_genutils.text import indent, wrap_paragraphs, dedent
  from ipython_genutils import py3compat
  import six
label_desc: Use image node_id 2 for calling a global function with example usage: boolean_flag(name, configurable, set_help, unset_help) and returns: dict