code: def _humanSortKey(s):
    
    if isinstance(s, str):
      return [w.isdigit() and int(w) or w for w in re.split(r'(\d+)', s)]
    else:
      return s
docs: Sort strings with numbers in a way that makes sense to humans (e.g., 5 < 20)