def run_example(example_coroutine, *extra_args):
args = _get_parser(extra_args).parse_args()<EOL>logging.basicConfig(level=logging.DEBUG if args.debug else logging.WARNING)<EOL>cookies = hangups.auth.get_auth_stdin(args.token_path)<EOL>client = hangups.Client(cookies)<EOL>loop = asyncio.get_event_loop()<EOL>task = asyncio.ensure_future(_async_main(example_coroutine, client, args),<EOL>loop=loop)<EOL>try:<EOL><INDENT>loop.run_until_complete(task)<EOL><DEDENT>except KeyboardInterrupt:<EOL><INDENT>task.cancel()<EOL>loop.run_until_complete(task)<EOL><DEDENT>finally:<EOL><INDENT>loop.close()<EOL><DEDENT>
Run a hangups example coroutine.

    Args:
        example_coroutine (coroutine): Coroutine to run with a connected
            hangups client and arguments namespace as arguments.
        extra_args (str): Any extra command line arguments required by the
            example.