def wrap_string_in_list(maybe_string):
    """ This function checks if maybe_string is a string (or anything derived
        from str). If so, it wraps it in a list.

        The motivation for this function is that some functions return either a
        single string or multiple strings as a list. The return value of this
        function can be iterated over safely.

        Args:
            maybe_string (obj): an object which may be a string

        Returns:
            either the original object, or maybe_string wrapped in a list, if
                it was a string
    """
    if isinstance(maybe_string, str):
        return [maybe_string]
    return maybe_string