def sort_dict(d: dict, number: bool = False) -> dict:
    """Sort a dict by keys"""
    if number:
        return dict(sorted(d.items(), key=lambda item: int(item[0])))
    else:
        return dict(sorted(d.items(), key=lambda item: item[0]))