from typing import List
from typing import Union
import re


def natural_sort(unsorted: List[str], reverse: bool = False) -> List[str]:
    """

    Sort a list of strings naturally (like humans would sort them)
    Example:
        Natural  With normal sorting
        -------  --------
        1.txt    1.txt
        2.txt    10.txt
        10.txt   2.txt
        20.txt   20.txt

    :param unsorted: unsorted list of strings
    :param reverse: reverse order of list
    :return: naturally sorted list
    """

    def _convert(s: str) -> Union[str, int]:
        return int(s) if s.isdigit() else s.lower()

    def _alphanum_key(key: str) -> List[Union[int, str]]:
        return [_convert(c) for c in re.split(r"([0-9]+)", key)]

    return sorted(unsorted, key=_alphanum_key, reverse=reverse)