class_docstr: CsvBulkWriter is for building :class:`~pyflink.common.serialization.BulkWriterFactory` to write
  Rows with a predefined CSV schema to partitioned files in a bulk fashion.
  
  Example:
  ::
  
      >>> schema = CsvSchema.builder() \
      ...     .add_number_column('id', number_type=DataTypes.INT()) \
      ...     .add_string_column('name') \
      ...     .add_array_column('list', ',', element_type=DataTypes.STRING()) \
      ...     .set_column_separator('|') \
      ...     .build()
      >>> sink = FileSink.for_bulk_format(
      ...     OUTPUT_DIR, CsvBulkWriters.for_schema(schema)).build()
      >>> ds.sink_to(sink)
  
  .. versionadded:: 1.16.0
docstr: Creates a :class:`~pyflink.common.serialization.BulkWriterFactory` for writing records to
  files in CSV format.
docstr_tok: ["Creates","a",":","class",":","`","~pyflink.common.serialization.BulkWriterFactory","`","for","writing","records","to","files","in","CSV","format","."]
code: def for_schema(schema: "CsvSchema") -> "BulkWriterFactory":
      """
      Creates a :class:`~pyflink.common.serialization.BulkWriterFactory` for writing records to
      files in CSV format.
      """
      from pyflink.table.types import _to_java_data_type
  
      jvm = get_gateway().jvm
      csv = jvm.org.apache.flink.formats.csv
  
      j_factory = csv.PythonCsvUtils.createCsvBulkWriterFactory(
          schema._j_schema, _to_java_data_type(schema._row_type)
      )
      return RowDataBulkWriterFactory(j_factory, schema._row_type)
  
imports: from typing import Optional, TYPE_CHECKING
  from pyflink.common.serialization import BulkWriterFactory, RowDataBulkWriterFactory, SerializationSchema, DeserializationSchema
  from pyflink.common.typeinfo import TypeInformation
  from pyflink.datastream.connectors.file_system import StreamFormat
  from pyflink.java_gateway import get_gateway
label_desc: Use image node_id 1 for calling the CsvBulkWriters obj's underlying member method code with example usage: obj.for_schema(schema) and returns: RowDataBulkWriterFactory