def ensure_iterable(inst):
if isinstance(inst, string_types):<EOL><INDENT>return [inst]<EOL><DEDENT>elif not isinstance(inst, collections.Iterable):<EOL><INDENT>return [inst]<EOL><DEDENT>else:<EOL><INDENT>return inst<EOL><DEDENT>
Wraps scalars or string types as a list, or returns the iterable instance.