<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stub(ctx):
 """ Generate typing stubs for the package. """


    report.info(ctx, "package.stub", f"generating typing stubs for package")
    ctx.run(
        f"stubgen --include-private --no-import "
        f"--output {ctx.directory.joinpath('stubs')!s} "
        f"--search-path {ctx.directory.joinpath('src')!s} "
        f"--package {ctx.metadata['package_name']}"
    )