<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_formatter(columns):
 """This function returns a callback to use with click options. The returned function parses a comma-separated value and returns a new ColumnFormatter. :param columns: a list of Column instances """


    column_map = dict((column.name, column) for column in columns)

    def validate(ctx, param, value):
        """Click validation function."""
        if value == '':
            raise click.BadParameter('At least one column is required.')

        formatter = ColumnFormatter()
        for column in [col.strip() for col in value.split(',')]:
            if column in column_map:
                formatter.add_column(column_map[column])
            else:
                formatter.add_column(Column(column, column.split('.')))

        return formatter

    return validate