class_docstr: Rule engine to processes rules
class_docstr_tok: ["Rule","engine","to","processes","rules"]
docstr: Call the dynamic_output function
  
  Args:
      dynamic_output (func): Callable function which returns None, str or List[str]
      rule_name (str): The name of the rule the functions belong to
      args_list (list): list of args to be passed to the dynamic function
          should be (record or record and context)
  Returns:
      list: list of additional outputs
docstr_tok: ["Call","the","dynamic_output","function","Args",":","dynamic_output","(","func",")",":","Callable","function","which","returns","None",",","str","or","List","[","str","]","rule_name","(","str",")",":","The","name","of","the","rule","the","functions","belong","to","args_list","(","list",")",":","list","of","args","to","be","passed","to","the","dynamic","function","should","be","(","record","or","record","and","context",")","Returns",":","list",":","list","of","additional","outputs"]
code: def _call_dynamic_output_function(function, rule_name, args_list):
      """Call the dynamic_output function
  
      Args:
          dynamic_output (func): Callable function which returns None, str or List[str]
          rule_name (str): The name of the rule the functions belong to
          args_list (list): list of args to be passed to the dynamic function
              should be (record or record and context)
      Returns:
          list: list of additional outputs
      """
      LOGGER.debug("invoking function %s", function.__name__)
  
      outputs = []
  
      try:
          outputs = function(*args_list)
      except Exception:  # pylint: disable=broad-except
          # Logger error and return []
          LOGGER.error(
              "Exception when calling dynamic_output %s for rule %s",
              function.__name__,
              rule_name,
          )
      else:
          LOGGER.debug(
              "function %s returned: %s", function.__name__, outputs
          )
  
          if isinstance(outputs, str):
              # Case 1: outputs is a string
              #   return outputs wrapped in a list
              outputs = [outputs]
          elif isinstance(outputs, list):
              # Case 2: outputs is a list
              #   return outputs
              pass
          else:
              # Case 3: outputs is neither a string or a list
              #   return an empty list
              outputs = []
  
      return outputs
  
imports: from datetime import datetime, timedelta
  from os import environ
  from streamalert.shared.publisher import AlertPublisherRepository
  from streamalert.rules_engine.alert_forwarder import AlertForwarder
  from streamalert.rules_engine.threat_intel import ThreatIntel
  from streamalert.shared import resources, RULES_ENGINE_FUNCTION_NAME
  from streamalert.shared.alert import Alert
  from streamalert.shared.config import load_config
  from streamalert.shared.importer import import_folders
  from streamalert.shared.logger import get_logger
  from streamalert.shared.lookup_tables.core import LookupTables
  from streamalert.shared.metrics import MetricLogger
  from streamalert.shared.rule import Rule
  from streamalert.shared.rule_table import RuleTable
  from streamalert.shared.stats import RuleStatisticTracker
label_desc: Use image node_id 10 for calling the RulesEngine obj's underlying member method code with example usage: obj._call_dynamic_output_function(function, rule_name, args_list) and returns: outputs