def deploy_rpc_test_contract(deploy_client, name):
    contract_path, contracts = get_test_contract(f"{name}.sol")
    contract_proxy, _ = deploy_client.deploy_solidity_contract(
        name, contracts, libraries=dict(), constructor_parameters=None, contract_path=contract_path
    )

    return contract_proxy
def test_telemetry_imports_catboost(runner, live_mock_server, parse_ctx):
    with runner.isolated_filesystem():
        with mock.patch.dict("sys.modules", {"catboost": mock.Mock()}):
            import catboost

            run = wandb.init()
            run.finish()

            ctx_util = parse_ctx(live_mock_server.get_ctx())
            telemetry = ctx_util.telemetry

            # catboost in both init and finish modules
            assert telemetry and 7 in telemetry.get("1", [])
            assert telemetry and 7 in telemetry.get("2", [])