code: def add(self, elt):
          
          # external commands may be received as a dictionary when pushed from the WebUI
          if isinstance(elt, dict) and 'my_type' in elt and elt['my_type'] == "externalcommand":
              if 'cmd_line' not in elt:
                  logger.debug("Received a bad formated external command: %s. "
                               "No cmd_line!", elt)
                  return
  
              logger.debug("Received a dictionary external command: %s", elt)
              if 'creation_timestamp' not in elt:
                  elt['creation_timestamp'] = None
              elt = ExternalCommand(elt['cmd_line'], elt['creation_timestamp'])
  
          if isinstance(elt, Brok):
              # For brok, we tag the brok with our instance_id
              elt.instance_id = self.instance_id
              if elt.type == 'monitoring_log':
                  # The brok is a monitoring event
                  with self.events_lock:
                      self.events.append(elt)
                  statsmgr.counter('events', 1)
              else:
                  with self.broks_lock:
                      self.broks.append(elt)
              statsmgr.counter('broks.added', 1)
          elif isinstance(elt, ExternalCommand):
              logger.debug("Queuing an external command: %s", str(ExternalCommand.__dict__))
              self.unprocessed_external_commands.append(elt)
              statsmgr.counter('external-commands.added', 1)
docs: Generic function to add objects to the daemon internal lists.
          Manage Broks, External commands
  
          :param elt: object to add
          :type elt: alignak.AlignakObject
          :return: None