class_docstr: Rule engine to processes rules
class_docstr_tok: ["Rule","engine","to","processes","rules"]
docstr: Load and return a RuleTable class for communicating with the DynamoDB rule table
  
  Args:
      config (dict): Loaded configuration from 'conf/' directory
  
  Returns:
      rule_table.RuleTable: Loaded frontend for DynamoDB rules table
docstr_tok: ["Load","and","return","a","RuleTable","class","for","communicating","with","the","DynamoDB","rule","table","Args",":","config","(","dict",")",":","Loaded","configuration","from","'conf\/","'","directory","Returns",":","rule_table.RuleTable",":","Loaded","frontend","for","DynamoDB","rules","table"]
code: def _load_rule_table(cls, config):
      """Load and return a RuleTable class for communicating with the DynamoDB rule table
  
      Args:
          config (dict): Loaded configuration from 'conf/' directory
  
      Returns:
          rule_table.RuleTable: Loaded frontend for DynamoDB rules table
      """
      # Ensure the rules table is enabled
      rule_staging_config = config["global"]["infrastructure"][
          "rule_staging"
      ]
      if not rule_staging_config.get("enabled", False):
          return
  
      now = datetime.utcnow()
      refresh_delta = timedelta(
          minutes=rule_staging_config.get(
              "cache_refresh_minutes",
              cls._RULE_TABLE_DEFAULT_REFRESH_MIN,
          )
      )
  
      # The rule table will need 'refreshed' if the refresh interval has been surpassed
      needs_refresh = cls._RULE_TABLE_LAST_REFRESH + refresh_delta < now
  
      if not needs_refresh:
          LOGGER.debug(
              "Rule table does not need refreshed (last refresh time: %s; "
              "current time: %s)",
              cls._RULE_TABLE_LAST_REFRESH,
              now,
          )
          return
  
      LOGGER.info(
          "Refreshing rule table (last refresh time: %s; current time: %s)",
          cls._RULE_TABLE_LAST_REFRESH,
          now,
      )
  
      table_name = "{}_streamalert_rules".format(
          env["STREAMALERT_PREFIX"]
      )
      cls._rule_table = RuleTable(table_name)
      cls._RULE_TABLE_LAST_REFRESH = now
  
imports: from datetime import datetime, timedelta
  from os import environ
  from streamalert.shared.publisher import AlertPublisherRepository
  from streamalert.rules_engine.alert_forwarder import AlertForwarder
  from streamalert.rules_engine.threat_intel import ThreatIntel
  from streamalert.shared import resources, RULES_ENGINE_FUNCTION_NAME
  from streamalert.shared.alert import Alert
  from streamalert.shared.config import load_config
  from streamalert.shared.importer import import_folders
  from streamalert.shared.logger import get_logger
  from streamalert.shared.lookup_tables.core import LookupTables
  from streamalert.shared.metrics import MetricLogger
  from streamalert.shared.rule import Rule
  from streamalert.shared.rule_table import RuleTable
  from streamalert.shared.stats import RuleStatisticTracker
label_desc: Use image node_id 4 for calling the RulesEngine obj's underlying member method code with example usage: obj._load_rule_table(cls, config) without return types