code: def handler(event, _):
      """Main Lambda handler function"""
      try:
          records = []
          for record in event.get("Records", []):
              body = json.loads(record["body"])
              if isinstance(body, list):
                  records.extend(body)
              else:
                  records.append(body)
          RulesEngine().run(records)
      except Exception:
          logger.get_logger(__name__).exception(
              "Invocation event: %s", json.dumps(event)
          )
          raise
  
imports: import json
  from streamalert.rules_engine import RulesEngine
  from streamalert.shared import logger
label_desc: Use image node_id 1 for calling a global function with example usage: handler(event, _) without return types