def _to_list(value):
    if isinstance(value, collections.Iterable) and not isinstance(value, six.string_types):
        return list(value)
    else:
        return [value]
Convert the value (an iterable or a scalar value) to a list.
dataset/ETHPy150Open Sage-Bionetworks/synapsePythonClient/synapseclient/utils.py/_to_list