class_docstr: Representation of a Git repository
  
      
code: def _cleanup(cls, path):
      # Ben: I think in case of GitRepo there's nothing to do ATM. Statements
      #      like the one in the out commented __del__ above, don't make sense
      #      with python's GC, IMO, except for manually resolving cyclic
      #      references (not the case w/ ConfigManager ATM).
      lgr.log(1, "Finalizer called on: GitRepo(%s)", path)
  
imports: import logging
  import re
  import threading
  import time
  from contextlib import contextmanager
  from locale import getpreferredencoding
  from os import environ
  from os.path import lexists
  from typing import Optional
  from weakref import finalize, WeakValueDictionary
  from datalad.cmd import GitWitlessRunner, StdOutErrCapture
  from datalad.config import ConfigManager
  from datalad.dataset.repo import PathBasedFlyweight, RepoInterface, path_based_str_repr
  from datalad.runner.nonasyncrunner import STDERR_FILENO, STDOUT_FILENO
  from datalad.runner.protocol import GeneratorMixIn
  from datalad.runner.utils import AssemblingDecoderMixIn, LineSplitter
  from datalad.support.exceptions import CommandError, GitIgnoreError, InvalidGitRepositoryError, PathKnownToRepositoryError
  from datalad.utils import ensure_list, lock_if_required, Path
label_desc: Use image node_id 3 for calling the GitRepo obj's underlying member method code with example usage: obj._cleanup(cls, path) without return types