code: def nsorted(
      to_sort: Iterable[str],
      key: Optional[Callable[[str], Any]] = None
  ) -> List[str]:
      
      if key is None:
          key_callback = _natural_keys
      else:
          def key_callback(text: str) -> List[Any]:
              return _natural_keys(key(text))  # type: ignore
  
      return sorted(to_sort, key=key_callback)
docs: Returns a naturally sorted list