This function mainly exists to be overridden by subclasses.

def invoke_command (self, cmd, args, **kwargs):
        """This function mainly exists to be overridden by subclasses."""
        new_kwargs = kwargs.copy ()
        new_kwargs['argv0'] = kwargs['argv0'] + ' ' + cmd.name
        new_kwargs['parent'] = self
        new_kwargs['parent_kwargs'] = kwargs
        return cmd.invoke_with_usage (args, **new_kwargs)