class_docstr: TestRule class
class_docstr_tok: ["TestRule","class"]
docstr: Simple helper to create a rule from a code block
  
  This injects rule name in to the code block and executes
  it with the passed 'options'
  
  Args:
      rule_name (str): Name of rule to use for rule function
      options (dict): Optional rule information, like 'logs', 'outputs', etc
docstr_tok: ["Simple","helper","to","create","a","rule","from","a","code","block","This","injects","rule","name","in","to","the","code","block","and","executes","it","with","the","passed","'options'","Args",":","rule_name","(","str",")",":","Name","of","rule","to","use","for","rule","function","options","(","dict",")",":","Optional","rule","information",",","like","'logs","'",",","'outputs","'",",","etc"]
code: def _create_rule_helper(rule_name, options=None):
      """Simple helper to create a rule from a code block
  
      This injects rule name in to the code block and executes
      it with the passed 'options'
  
      Args:
          rule_name (str): Name of rule to use for rule function
          options (dict): Optional rule information, like 'logs', 'outputs', etc
      """
      if not options:
          options = {"logs": ["log_type_01"]}
  
      custom_rule_code = """
  @rule.rule(**options)
  def {}(_):
      return False
  """.format(
          rule_name
      )
  
      exec(custom_rule_code)
  
imports: import hashlib
  from mock import patch
  from nose.tools import assert_equal, assert_true, raises
  from streamalert.shared import rule, rule_table
label_desc: Use image node_id 3 for calling the TestRule obj's underlying member method code with example usage: obj._create_rule_helper(rule_name, options) without return types