code: def get_formatter(columns):
      
  
      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
docs: 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