def listify(text, separator=None):
    """Turn 'text' into a list using 'separator'"""
    if isinstance(text, list):
        return text

    if isinstance(text, (set, tuple)):
        return list(text)

    if separator:
        text = text.replace("\n", separator)

    return [s.strip() for s in text.split(separator) if s.strip()]