code: def check_ref_format(scm: "Git", ref: ExpRefInfo):
      # "/" forbidden, only in dvc exp as we didn't support it for now.
      if not scm.check_ref_format(str(ref)) or "/" in ref.name:
          raise InvalidArgumentError(
              f"Invalid exp name {ref.name}, the exp name must follow rules in "
              "https://git-scm.com/docs/git-check-ref-format"
          )
  
imports: import os
  import random
  import sys
  from collections import defaultdict
  from functools import wraps
  from typing import TYPE_CHECKING, Callable, Dict, Generator, Iterable, List, Mapping, Optional, Set, Tuple, Union
  from dvc.exceptions import InvalidArgumentError
  from dvc.repo.experiments.exceptions import AmbiguousExpRefInfo
  from dvc.rwlock import rwlock
  from dvc.scm import Git
  from .refs import EXEC_APPLY, EXEC_BASELINE, EXEC_BRANCH, EXPS_NAMESPACE, ITER_SKIP_NAMESPACES, STASHES, ExpRefInfo
label_desc: Use image node_id 16 for calling a global function with example usage: check_ref_format(scm, ref) without return types