code: def natural_key(s):
      """Converts string ``s`` into a tuple that will sort "naturally" (i.e.,
      ``name5`` will come before ``name10`` and ``1`` will come before ``A``).
      This function is designed to be used as the ``key`` argument to sorting
      functions.
  
      :param s: the str/unicode string to convert.
      :rtype: tuple
      """
  
      # Use _nkre to split the input string into a sequence of
      # digit runs and non-digit runs. Then use _nkconv() to convert
      # the digit runs into ints and the non-digit runs to lowercase.
      return tuple(_nkconv(m) for m in _nkre.findall(s))
  
file_path: whoosh/src/whoosh/util/text.py
imports: import codecs, re
  from whoosh.compat import string_type, u, byte
label_desc: Use image node_id 6 for calling a global function with example usage: natural_key(s) and returns: tuple