def fetch_command(self, subcommand):
        """
        Gets a given command
        """
        try:
            app_name = get_commands()[subcommand]
        except __HOLE__:
            sys.stderr.write("Unknown command: %r\nType '%s help' for usage.\n" % \
                             (subcommand, self.prog_name))
            sys.exit(1)
        if isinstance(app_name, BaseCommand):
            # If the command is already loaded, use it directly.
            klass = app_name
        else:
            klass = load_command_class(app_name, subcommand)
        return klass
dataset/ETHPy150Open VikParuchuri/percept/percept/management/base.py/Management.fetch_command