import re


def name_string_to_list(composite_names):
    """
    Split comma separated slurm composite node name format.
    Composite node names contain commas so ignore them within brackets.
    :param composite_names: str: a comma separated nodename list
    :return: list of composite node names
    """
    splitter = re.compile(r'(?:[^,\[]|\[[^\]]*\])+')
    return splitter.findall(composite_names)