def get_missing_object(wizard, obj_dict, display_name, fallback_func):
    """Get a prerequisite object.

    The ``obj_dict`` here is typically a mapping of objects known by the
    Wizard. If it is empty, the ``fallback_func`` is used to create a new
    object. If it has exactly 1 entry, that is used implicitly. If it has
    more than 1 entry, the user must select which one to use.

    Parameters
    ----------
    wizard : :class:`.Wizard`
        the wizard for user interaction
    obj_dict : Dict[str, Any]
        mapping of object name to object
    display_name: str
        the user-facing name of this type of object
    fallback_func: Callable[:class:`.Wizard`] -> Any
        method to create a new object of this type

    Returns
    -------
    Any :
        the prerequisite object
    """
    if len(obj_dict) == 0:
        obj = fallback_func(wizard)
    elif len(obj_dict) == 1:
        obj = list(obj_dict.values())[0]
    else:
        objs = list(obj_dict.keys())
        sel = wizard.ask_enumerate(f"Which {display_name} would you like "
                                   "to use?", options=objs)
        obj = obj_dict[sel]
    return obj