code: def test_api_commit(capsys, repo):
      commit_msg = "epoch_1"
      repo.commit(message=commit_msg)
      with open(".wgit/.git/logs/HEAD") as f:
          line = f.readlines()
      assert line[0].rstrip().split()[-1] == commit_msg
  
file_path: fairscale/tests/experimental/wgit/test_api.py
imports: import json
  import os
  from pathlib import Path
  import random
  import shutil
  import pytest
  import torch
  from torch import nn
  from fairscale.experimental.wgit.repo import Repo, RepoStatus
label_desc: Use image node_id 6 for calling a global function with example usage: test_api_commit(capsys, repo) without return types