code: def validate_args(opts):
      
      if opts['--wide'] is None:
          opts['--wide'] = 2
      else:
          assert opts['--wide'] in ("1", "2"), opts['--wide']
      if opts['--alignment'] is None:
          opts['--alignment'] = 'left'
      else:
          assert opts['--alignment'] in ('left', 'right'), opts['--alignment']
      opts['--wide'] = int(opts['--wide'])
      opts['character_factory'] = WcWideCharacterGenerator
      if opts['--combining']:
          opts['character_factory'] = WcCombinedCharacterGenerator
      return opts
docs: Validate and return options provided by docopt parsing.