def METHOD_NAME(self, repo_url, branch, tag, commit_hash, is_dirty):
    code_ver = verta.code.Git(
        repo_url=repo_url,
        branch=branch,
        tag=tag,
        commit_hash=commit_hash,
        is_dirty=is_dirty,
    )
    refs = [arg for arg in (branch, tag, commit_hash) if arg]
    ref = refs[0] if refs else _git_utils.get_git_commit_hash("HEAD")
    assert code_ver.repo_url == (repo_url or _git_utils.get_git_remote_url())
    assert code_ver.branch == (branch or _git_utils.get_git_branch_name(ref))
    assert code_ver.tag == (
        tag or _git_utils.get_git_commit_tag(ref) or None
    )  # None if HEAD is not at a tag
    assert code_ver.commit_hash == (
        commit_hash or _git_utils.get_git_commit_hash(ref)
    )
    assert code_ver.is_dirty == (
        is_dirty
        if is_dirty is not None
        else _git_utils.get_git_commit_dirtiness(ref)
    )