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().diff() == {}
  
imports: import hashlib
  import os
  import pytest
  from funcy import first
  from dvc.exceptions import DvcException
  from dvc.utils.fs import remove
label_desc: Use image node_id 15 for calling a global function with example usage: test_no_commits(tmp_dir) without return types