code: def rule(**opts):
      """Decorator to be used to register a rule"""
  
      def decorator(rule_func):
          """Rule decorator logic that returns instance of Rule"""
          return Rule(rule_func, **opts)
  
      return decorator
  
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 for calling a global function with example usage: rule() and returns: decorator, Rule