def METHOD_NAME(mocker, tmp_global_dir):
    mock_json = mocker.patch("json.dump")
    mock_daemon = mocker.patch("dvc.daemon._spawn")
    analytics.collect_and_send_report()
    report = mock_json.call_args[0][0]
    assert not report.get("cmd_class")
    assert not report.get("cmd_return_code")
    args = parse_args(["add", "foo"])
    return_code = 0
    analytics.collect_and_send_report(args, return_code)
    report = mock_json.call_args[0][0]
    assert report["cmd_class"] == "CmdAdd"
    assert report["cmd_return_code"] == return_code
    assert mock_daemon.call_count == 2