def argsort(*args, **kwargs):
    if len(args) == 1 and isinstance(args[0], dict):
        dict_ = args[0]
        index_list = list(dict_.keys())
        value_list = list(dict_.values())
        return sortedby2(index_list, value_list)
    else:
        index_list = list(range(len(args[0])))
        return sortedby2(index_list, *args, **kwargs)