'Given a command to execute and stage,
execute that command.'

def dispatch_command(self, command, stage):

    self.api_stage = stage
    if (command not in [u'status', u'manage']):
        if (not self.vargs[u'json']):
            click.echo(((((u'Calling    ' + click.style(command, fg=u'green', bold=True)) + u'    for    stage    ') + click.style(self.api_stage, bold=True)) + u'..'))
    if self.vargs.get(u'app_function', None):
        self.app_function = self.vargs[u'app_function']
    try:
        self.load_settings(self.vargs.get(u'settings_file'))
    except ValueError as e:
        print u'Error:    {}'.format(e.message)
        sys.exit((-1))
    self.callback(u'settings')
    if (command == u'deploy'):
        self.deploy()
    if (command == u'package'):
        self.package(self.vargs[u'output'])
    if (command == u'template'):
        self.template(self.vargs[u'lambda_arn'], self.vargs[u'role_arn'], output=self.vargs[u'output'], json=self.vargs[u'json'])
    elif (command == u'update'):
        self.update()
    elif (command == u'rollback'):
        self.rollback(self.vargs[u'num_rollback'])
    elif (command == u'invoke'):
        if (not self.vargs.get(u'command_rest')):
            print u'Please    enter    the    function    to    invoke.'
            return
        self.invoke(self.vargs[u'command_rest'], raw_python=self.vargs[u'raw'], no_color=self.vargs[u'no_color'])
    elif (command == u'manage'):
        if (not self.vargs.get(u'command_rest')):
            print u'Please    enter    the    management    command    to    invoke.'
            return
        if (not self.django_settings):
            print u'This    command    is    for    Django    projects    only!'
            print u'If    this    is    a    Django    project,    please    define    django_settings    in    your    zappa_settings.'
            return
        command_tail = self.vargs.get(u'command_rest')
        if (len(command_tail) > 1):
            command = u'    '.join(command_tail)
        else:
            command = command_tail[0]
        self.invoke(command, command=u'manage', no_color=self.vargs[u'no_color'])
    elif (command == u'tail'):
        self.tail(colorize=(not self.vargs[u'no_color']), http=self.vargs[u'http'], non_http=self.vargs[u'non_http'], since=self.vargs[u'since'], filter_pattern=self.vargs[u'filter'])
    elif (command == u'undeploy'):
        self.undeploy(no_confirm=self.vargs[u'yes'], remove_logs=self.vargs[u'remove_logs'])
    elif (command == u'schedule'):
        self.schedule()
    elif (command == u'unschedule'):
        self.unschedule()
    elif (command == u'status'):
        self.status(return_json=self.vargs[u'json'])
    elif (command == u'certify'):
        self.certify(no_cleanup=self.vargs[u'no_cleanup'], no_confirm=self.vargs[u'yes'], manual=self.vargs[u'manual'])
    elif (command == u'shell'):
        self.shell()
