code: def test_collect_and_send_report(mocker, dvc, mock_daemon):
      mock_post = mocker.patch("requests.post")
      collect_and_send_report()
  
      assert mock_daemon.call_count == 1
      assert mock_post.call_count == 1
      assert mock_post.call_args == mocker.call(
          "https://analytics.dvc.org",
          json=ANY(dict),
          headers={"content-type": "application/json"},
          timeout=5,
      )
  
file_path: dvc/tests/func/test_analytics.py
imports: import os
  import pytest
  from dvc.analytics import _scm_in_use, collect_and_send_report
  from dvc.cli import main
  from dvc.repo import Repo
  from tests.utils import ANY
label_desc: Use image node_id 4 for calling a global function with example usage: test_collect_and_send_report(mocker, dvc, mock_daemon) without return types