def arg_to_iter(arg):
    if arg is None:
        return []
    elif not isinstance(arg, _ITERABLE_SINGLE_VALUES) and hasattr(arg, '__iter__'):
        return arg
    else:
        return [arg]
Convert an argument to an iterable. The argument can be a None, single
dataset/ETHPy150Open scrapy/scrapy/scrapy/utils/misc.py/arg_to_iter