'Initialize options.
Args:
options: List of allowed values.'

def __init__(self, *options, **kw):

    if ('default' in kw):
        default = kw['default']
    else:
        default = None
    alias_map = {}
    def AddAlias(alias, original):
        'Set    new    alias    on    alias_map.\n\n                        Raises:\n                                AttributeDefinitionError:    when    option    already    exists    or    if    alias    is\n                                        not    of    type    str.\n                        '
        if (not isinstance(alias, str)):
            raise AttributeDefinitionError('All    option    values    must    be    of    type    str.')
        elif (alias in alias_map):
            raise AttributeDefinitionError(("Option    '%s'    already    defined    for    options    property." % alias))
        alias_map[alias] = original
    for option in options:
        if isinstance(option, str):
            AddAlias(option, option)
        elif isinstance(option, (list, tuple)):
            if (len(option) != 2):
                raise AttributeDefinitionError("Alias    is    defined    as    a    list    or    tuple    with    two    items.        The    first    is    the    original    option,    while    the    second    is    a    list    or    tuple    of    str    aliases.\n\n        Example:\n                        ('original',    ('alias1',    'alias2'")
            (original, aliases) = option
            AddAlias(original, original)
            if (not isinstance(aliases, (list, tuple))):
                raise AttributeDefinitionError('Alias    lists    must    be    a    list    or    tuple')
            for alias in aliases:
                AddAlias(alias, original)
        else:
            raise AttributeDefinitionError('All    options    must    be    of    type    str    or    of    the    form    (str,    [str...]).')
    super(Options, self).__init__(default)
    self.options = alias_map
