class_docstr: Statefully sort schema by priority where 0 is the highest priority
  and the lowest priority is any positive numeric value.
  In the event that no priority is specified for a schema,
  it will be placed at the end after all schema with a priority defined.
  If no priority or equal priority is specified for multiple schema, they will
  be sorted in the order they were encountered. The intent of the statefulness
  of this function is that there is no arbitrarily enforced upper bound for priority.
docstr: Key function for pythons sort function.
  Return each schemas priority or the max encountered priority if none was specified.
docstr_tok: ["Key","function","for","pythons","sort","function",".","Return","each","schemas","priority","or","the","max","encountered","priority","if","none","was","specified","."]
code: def sort_key(self, key_and_value_tuple):
      """Key function for pythons sort function.
      Return each schemas priority or the max encountered priority if none was specified.
      """
      dict_value = key_and_value_tuple[1]
      value = int(
          dict_value.get("configuration", {}).get("priority", -1)
      )
  
      # Update the index to the max of the current index or cached one
      self.max_index = max(self.max_index, value)
  
      # If the index is -1 (or unset), use the current "max_index"
      # Otherwise, return the actual priority value
      return self.max_index if value == -1 else value
  
imports: from collections import defaultdict, OrderedDict
  import json
  import os
  import re
  from streamalert.shared import CLUSTERED_FUNCTIONS
  from streamalert.shared.exceptions import ConfigError
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 2 for calling the SchemaSorter obj's underlying member method code with example usage: obj.sort_key(key_and_value_tuple) and returns: unknown