def _select_option(options: dict):
    """ Present a dictionary of options to the user for selection """
    for ix, (k, v) in enumerate(options.items()):
        print(f'[{str(ix)}] {k}')
    choice = input("Choose an option by number or name: ")
    print('')

    try:
        choice = int(choice)  # treat the input as if it was an integer
        choice = list(options.keys())[choice]
    except ValueError:  # otherwise assume it was a key value
        pass

    return options[choice], choice