docs: def _generate_command(self, func, name=None, **kwargs):
          """Generates a command parser for given func.
  
          :param func: func to generate related command parser
          :param type: function
  
          :param name: command name
          :param type: str
  
          :param **kwargs: keyword arguments those passed through to
                           :py:class:``argparse.ArgumentParser.add_parser``
          :param type: dict
  
          """
          func_pointer = name or func.__name__
          storm_config = get_storm_config()
          aliases, additional_kwarg = None, None
          if 'aliases' in storm_config:
              for command, alias_list in \
                      six.iteritems(storm_config.get("aliases")):
                  if func_pointer == command:
                      aliases = alias_list
                      break
  
          func_help = func.__doc__ and func.__doc__.strip()
          subparser = self.subparsers.add_parser(name or func.__name__,
                                                 aliases=aliases,
                                                 help=func_help)
          spec = inspect.getargspec(func)
          opts = reversed(list(izip_longest(reversed(spec.args or []),
                                            reversed(spec.defaults or []),
                                            fillvalue=self._POSITIONAL())))
          for k, v in opts:
              argopts = getattr(func, 'argopts', {})
              args, kwargs = argopts.get(k, ([], {}))
              args = list(args)
              is_positional = isinstance(v, self._POSITIONAL)
              options = [arg for arg in args if arg.startswith('-')]
              if isinstance(v, list):
                  kwargs.update({
                      'action': 'append',
                  })
              if is_positional:
                  if options:
                      args = options
                      kwargs.update({'required': True, 'dest': k})
                  else:
                      args = [k]
  
              else:
                  args = options or ['--%s' % k]
                  kwargs.update({'default': v, 'dest': k})
  
              arg = subparser.add_argument(*args, **kwargs)
  
          subparser.set_defaults(**{self._COMMAND_FLAG: func})
          return func