Prompts user to pick from provided options.

    It is possible to provide a function as an option although it is
    not yet tested.  This could allow a user to be prompted to provide
    their own value rather than the listed options.

    Args:
      field_name (string): Name of the field.
      context_str (string): Printed to give the user context.
      options: Variable arguments, should be vobject Components
          in a list. As retrieved from a vCard.contents dictionary.

    Returns:
        One of the options passed in.  Ideally always a list.

def SelectFieldPrompt(field_name, context_str, *options):
    """Prompts user to pick from provided options.

    It is possible to provide a function as an option although it is
    not yet tested.  This could allow a user to be prompted to provide
    their own value rather than the listed options.

    Args:
      field_name (string): Name of the field.
      context_str (string): Printed to give the user context.
      options: Variable arguments, should be vobject Components
          in a list. As retrieved from a vCard.contents dictionary.

    Returns:
        One of the options passed in.  Ideally always a list.
    """
    option_format_str = '[ {} ] "{}"'
    option_dict = {}
    print(context_str)
    print('Please select one of the following options for field "{}"'.format(
        field_name)
    )
    for cnt, option in enumerate(options):
        option_dict['{}'.format(cnt + 1)] = option
        if not callable(option):
            print(option_format_str.format(cnt + 1, u(str(option))))
        else:
            print(option_format_str.format(cnt + 1, option.__name__))
    choice = None
    while choice not in option_dict:
        choice = input('option> ').strip()
    new_value = option_dict[choice]
    if callable(new_value):
        return new_value()
    else:
        return new_value