<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _get_usage(self):
 """ Build usage string from argparser args. """

        parser = argparse.ArgumentParser()
        parser.prog = 'juju-resources {}'.format(self.object_name)
        for set_name, set_args in getattr(self.object, '_subcommand_argsets', {}).items():
            for ap_args, ap_kwargs in set_args:
                parser.add_argument(*ap_args, **ap_kwargs)
        for ap_args, ap_kwargs in getattr(self.object, '_subcommand_args', []):
            parser.add_argument(*ap_args, **ap_kwargs)
        usage = parser.format_usage()
        usage = re.sub(r'\n *', ' ', usage)
        return usage.strip()