'Factory using an options dictionary.
Args:
options: Dictionary of options containing:
template: A Python dict-interpolation string. Required.
prolog: written before the per-record output.
epilog: written after the per-record output.
mode: one of the following, default is \'text\'
text: text file mode, newlines between records.
nonewline: text file mode, no added newlines.
binary: binary file mode, no added newlines.
name: The name of this transformer, for use in error messages.
Returns:
SimpleTextConnector object described by the specified options.
Raises:
InvalidConfiguration: If the config is invalid.'

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

    template = options.get('template')
    if (not template):
        raise bulkloader_errors.InvalidConfiguration(('simpletext    must    specify    template.    (In    transformer    named    %s)' % name))
    prolog = options.get('prolog')
    epilog = options.get('epilog')
    mode = options.get('mode', 'text')
    return cls(template, prolog, epilog, mode, name)
