code: def check_types_compatibility(
      dtype: str,
      base_dtype: str,
      update_base_dtype_fn: Optional[Callable[[str, str], None]] = None,
  ) -> bool:
      if dtype == base_dtype:
          return True
      if base_dtype == "number" and dtype in {"int", "float"}:
          return True
      if {dtype, base_dtype} == {"int", "float"}:
          if update_base_dtype_fn is not None:
              update_base_dtype_fn(base_dtype, "number")
          return True
      if base_dtype == "list" and any_list_regex.match(dtype):
          if update_base_dtype_fn is not None:
              update_base_dtype_fn(base_dtype, dtype)
          return True
      if dtype == "list" and any_list_regex.match(base_dtype):
          return True
      return False
  
imports: import os
  import shutil
  import tarfile
  import pathlib
  import re
  import uuid
  from contextlib import contextmanager
  from typing import Union, Any, Tuple, Optional, Callable
  from aim.sdk.configs import get_aim_repo_name
  from aim.storage.object import CustomObject
  from logging import getLogger
label_desc: Use image node_id 5 for calling a global function with example usage: check_types_compatibility(dtype, base_dtype, update_base_dtype_fn) and returns: False, True, True, True, True, True