def coverage_usepkgs_counts(self, **kwargs: TCovKwargs) -> dict[str, int]:
        """Run coverage on usepkgs and return a line summary.

        Arguments are passed to the `coverage.Coverage` constructor.

        """
        cov = coverage.Coverage(**kwargs)
        with cov.collect():
            import usepkgs  # pylint: disable=import-error, unused-import
        with self.assert_warnings(cov, []):
            data = cov.get_data()
        summary = line_counts(data)
        for k, v in list(summary.items()):
            assert k.endswith(".py")
            summary[k[:-3]] = v
        return summary
Run coverage on usepkgs and return a line summary.

        Arguments are passed to the `coverage.Coverage` constructor.

        
tests/test_api.py