Attaches a 'module': modulename entry to each node in the dictionary.
  This is used by the help printer so that the user can tell if a command was
  included by default or via a module.

def _attach_module_identifier(command_dict, modulefn):
  """
  Attaches a 'module': modulename entry to each node in the dictionary.
  This is used by the help printer so that the user can tell if a command was
  included by default or via a module. 
  """
  for command in command_dict:
    command_dict[command]['module'] = modulefn
    _attach_module_identifier(command_dict[command]['children'], modulefn)