code: def _deep_convert_to_tuple(
      dct: dict[str, str | TupleStr | list[str] | dict[str, t.Any]]
  ) -> dict[str, str | TupleStr | list[str] | dict[str, t.Any]]:
      for k, v in dct.items():
          override = v
          if isinstance(v, list):
              override = tuple(v)
          elif isinstance(v, dict):
              override = _deep_convert_to_tuple(v)
          dct[k] = override
      return dct
  
imports: from __future__ import annotations
  import inspect
  import logging
  import os
  import platform
  import shutil
  import typing
  import warnings
  from types import ModuleType
  import attr
  import bentoml
  from ...exceptions import BentoMLException
  from ...exceptions import MissingDependencyException
  from ...exceptions import NotFound
  from ..models.model import Model
  from ..models.model import ModelContext
  from ..models.model import ModelOptions
  from ..models.model import ModelSignature
  from ..tag import Tag
  from ..types import LazyType
  from ..utils import LazyLoader
  from ..utils.pkg import get_pkg_version
  from ..utils.pkg import pkg_version_info
  from .utils.transformers import extract_commit_hash
  from .utils.transformers import init_empty_weights
label_desc: Use image node_id 1 for calling a global function with example usage: _deep_convert_to_tuple(dct) and returns: dct