docs: def natural_sort_key(s):
      """
      returns a key that can be used in sort functions.
  
      Example:
  
      >>> items = ['A99', 'a1', 'a2', 'a10', 'a24', 'a12', 'a100']
  
      The normal sort function will ignore the natural order of the
      integers in the string:
  
      >>> print sorted(items)
      ['A99', 'a1', 'a10', 'a100', 'a12', 'a2', 'a24']
  
      When we use this function as a key to the sort function,
      the natural order of the integer is considered.
  
      >>> print sorted(items, key=natural_sort_key)
      ['A99', 'a1', 'a2', 'a10', 'a12', 'a24', 'a100']
      """
      return [int(text) if text.isdigit() else text
              for text in re.split(INTEGER_RE, str(s))]