def filter_files(files, colored=True):
    """Filter out only .swc files that are/are not colored from the sample data
    
    Keyword arguments:
        files -- (array) a list of filenames
        colored -- (bool) whether to include or exclude colored files
    
    Returns: An array of file names
    """
    filtered_files = []
    for filename in files:
        if colored and ("ColorCoded" in filename):
                filtered_files.append(filename)
        if not colored and ("ColorCoded" not in filename):
                filtered_files.append(filename)
    return filtered_files