code: def test_no_commits(tmp_dir):
      from dvc.repo import Repo
      from dvc.scm import Git
  
      git = Git.init(tmp_dir.fs_path)
      assert git.no_commits
  
      assert Repo.init().metrics.diff() == {}
  
imports: import json
  from os.path import join
  import pytest
  from dvc.cli import main
  from dvc.utils import relpath
  from dvc.utils.serialize import JSONFileCorruptedError
label_desc: Use image node_id 10 for calling a global function with example usage: test_no_commits(tmp_dir) without return types