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 the given hash's digest to a numerical value for the ring.
dataset/ETHPy150Open scrapy/scrapy/scrapy/utils/misc.py/arg_to_iter--crossover with--dataset/ETHPy150Open openstack/ironic/ironic/common/hash_ring.py/HashRing._hash2int