code: def _naturalize(string):
      
      splits = re.split("([0-9]+)", string)
      return [int(text) if text.isdigit() else text.lower() for text in splits]
docs: Provides a natural representation for string for nice sorting.