'Factory using an options dictionary.
Args:
options: Dictionary of options:
columns: \'from_header\' or blank.
column_list: overrides columns specifically.
encoding: encoding of the file. e.g. \'utf-8\' (default), \'windows-1252\'.
skip_import_header_row: True to ignore the header line on import.
Defaults False, except must be True if columns=from_header.
print_export_header_row: True to print a header line on export.
Defaults to False except if columns=from_header.
import_options: Other kwargs to pass in, like "dialect".
export_options: Other kwargs to pass in, like "dialect".
name: The name of this transformer, for use in error messages.
Returns:
CsvConnector object described by the specified options.
Raises:
InvalidConfiguration: If the config is invalid.'

@classmethod
def create_from_options(cls, options, name):

    column_list = options.get('column_list', None)
    columns = None
    if (not column_list):
        columns = options.get('columns', 'from_header')
        if (columns != 'from_header'):
            raise bulkloader_errors.InvalidConfiguration(('CSV    columns    must    be    "from_header",    or    a    column_list    must    be    specified.    (In    transformer    name    %s.)' % name))
    csv_encoding = options.get('encoding', 'utf-8')
    skip_import_header_row = options.get('skip_import_header_row', (columns == 'from_header'))
    if ((columns == 'from_header') and (not skip_import_header_row)):
        raise bulkloader_errors.InvalidConfiguration(('When    CSV    columns    are    "from_header",    the    header    row    must    always    be    skipped.    (In    transformer    name    %s.)' % name))
    print_export_header_row = options.get('print_export_header_row', (columns == 'from_header'))
    import_options = options.get('import_options', {})
    export_options = options.get('export_options', {})
    return cls(columns, column_list, skip_import_header_row, print_export_header_row, csv_encoding, import_options, export_options)
