code: def warn_on_undefined_git_identity(cfg: ConfigManager):
      """Check whether a Git identity is defined, and warn if not"""
      for cfgkey, envs in (
          ("user.name", ("GIT_AUTHOR_NAME", "GIT_COMMITTER_NAME")),
          ("user.email", ("GIT_AUTHOR_EMAIL", "GIT_COMMITTER_EMAIL")),
      ):
          if cfgkey not in cfg and not any(
              e in os.environ for e in envs
          ):
              lgr.warning(
                  "It is highly recommended to configure Git before using "
                  "DataLad. Set both 'user.name' and 'user.email' "
                  "configuration variables."
              )
              break
  
imports: import json
  import logging
  import os
  import re
  import threading
  import warnings
  from collections import namedtuple
  from fasteners import InterProcessLock
  from functools import lru_cache, wraps
  from pathlib import Path
  import datalad
  from datalad.consts import DATASET_CONFIG_FILE
  from datalad.runner import CommandError, GitRunner, KillOutput, StdOutErrCapture
  from datalad.utils import getpwd, on_windows
label_desc: Use image node_id 11 for calling a global function with example usage: warn_on_undefined_git_identity(cfg) without return types