import six
import re


def _split_arg(arg):
    """Split a comma-separated string into a list."""
    if isinstance(arg, six.string_types):
        arg = [it for it in re.split(r'[\s,]+', arg) if it]
    return arg