class_docstr: Provides convenience methods for accessing and modifying the rules table.
class_docstr_tok: ["Provides","convenience","methods","for","accessing","and","modifying","the","rules","table","."]
docstr: Cast certain values into their respective object types
  
  Args:
      key (str): Name of key that this value corresponds to
      value : Object to be cast, could be various types
  
  Returns:
      object: Variant type object in the expected type
docstr_tok: ["Cast","certain","values","into","their","respective","object","types","Args",":","key","(","str",")",":","Name","of","key","that","this","value","corresponds","to","value",":","Object","to","be","cast",",","could","be","various","types","Returns",":","object",":","Variant","type","object","in","the","expected","type"]
code: def _cast_value(cls, key, value):
      """Cast certain values into their respective object types
  
      Args:
          key (str): Name of key that this value corresponds to
          value : Object to be cast, could be various types
  
      Returns:
          object: Variant type object in the expected type
      """
      # Handle date casting from string to datetime object
      if key in {"StagedAt", "StagedUntil"}:
          return datetime.strptime(value, cls.DATETIME_FORMAT)
  
      return value
  
imports: from datetime import datetime, timedelta
  import boto3
  from streamalert.shared.helpers.dynamodb import ignore_conditional_failure
  from streamalert.shared.importer import import_folders
  from streamalert.shared.logger import get_logger
  from streamalert.shared.rule import Rule
label_desc: Use image node_id 5 for calling the RuleTable obj's underlying member method code with example usage: obj._cast_value(cls, key, value) and returns: value, datetime