def METHOD_NAME(ctx: click.Context, **kwargs):
    context: Context = ctx.obj
    config = context.config
    repo = context.repo
    context.pm.hook.on_start_command(command="generate", kwargs=kwargs)
    news_fragments = collect_news_fragments(
        repo,
        pm=context.pm,
    )
    output = MutableProxy[Output]()
    context.pm.hook.generate_output(version_news=news_fragments, output=output)
    context.pm.hook.write_output(output=output.value)