class_docstr: Provides convenience methods for accessing and modifying the alerts table.
docstr: Paginate results from a scan() or query().
  
  Args:
      func (method): Function to invoke (scan or query).
      func_kwargs (dict): Keyword arguments to pass to the scan/query function.
          The kwargs will be modified if pagination is necessary.
  
  Yields:
      dict: Each item (row) from the response
docstr_tok: ["Paginate","results","from","a","scan","(",")","or","query","(",")",".","Args",":","func","(","method",")",":","Function","to","invoke","(","scan","or","query",")",".","func_kwargs","(","dict",")",":","Keyword","arguments","to","pass","to","the","scan\/query","function",".","The","kwargs","will","be","modified","if","pagination","is","necessary",".","Yields",":","dict",":","Each","item","(","row",")","from","the","response"]
code: def _paginate(func, func_kwargs):
      """Paginate results from a scan() or query().
  
      Args:
          func (method): Function to invoke (scan or query).
          func_kwargs (dict): Keyword arguments to pass to the scan/query function.
              The kwargs will be modified if pagination is necessary.
  
      Yields:
          dict: Each item (row) from the response
      """
      while True:
          response = func(**func_kwargs)
          for item in response.get("Items", []):
              yield item
  
          if response.get("LastEvaluatedKey"):
              func_kwargs["ExclusiveStartKey"] = response[
                  "LastEvaluatedKey"
              ]
          else:
              return
  
file_path: streamalert/streamalert/shared/alert_table.py
imports: from datetime import datetime, timedelta
  import boto3
  from boto3.dynamodb.conditions import Attr, Key
  from streamalert.shared.alert import Alert
  from streamalert.shared.helpers.dynamodb import ignore_conditional_failure
label_desc: Use image node_id 3 for calling the AlertTable obj's underlying member method code with example usage: obj._paginate(func, func_kwargs) without return types