class_docstr: Rule class to handle processing
code: def __init__(self, func, **kwargs):
      self.func = func
      self.name = func.__name__
      self.datatypes = kwargs.get("datatypes")
      self.logs = kwargs.get("logs")
      self.matchers = kwargs.get("matchers")
      self.merge_by_keys = kwargs.get("merge_by_keys")
      self.merge_window_mins = kwargs.get("merge_window_mins") or 0
      self.outputs = kwargs.get("outputs")
      self.dynamic_outputs = kwargs.get("dynamic_outputs")
      self.publishers = kwargs.get("publishers")
      self.req_subkeys = kwargs.get("req_subkeys")
      self.initial_context = kwargs.get("context")
      self.context = None
      self.disabled = False
      self._description = func.__doc__
      self._checksum = None
  
      if not (self.logs or self.datatypes):
          raise RuleCreationError(
              "Invalid rule [{}] - rule must have either 'logs' "
              "or 'datatypes' declared'".format(self.name)
          )
  
      if self.name in Rule._rules:
          raise RuleCreationError(
              "Rule [{}] already defined".format(self.name)
          )
  
      Rule._rules[self.name] = self
  
imports: import ast
  from copy import deepcopy
  import hashlib
  import inspect
  import json
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 1 to create a new Rule object  with example: obj = Rule(func)