def _ensure_list_of_lists(entries):
    """Transform input to being a list of lists."""
    if not isinstance(entries, list):
        # user passed in single object
        # wrap in a list
        # (next transformation will make this a list of lists)
        entries = [entries]
    if not any(isinstance(element, list) for element in entries):
        # user passed in a list of objects, not a list of lists
        # wrap in a list
        entries = [entries]
    return entries