code: def validate_dict(obj, key_types, value_types, desc=""):
      if not isinstance(obj, dict):
          raise ValueError(
              "%sexpected a dictionary"
              % ("%s: " % desc if desc else "")
          )
      if not all(isinstance(x, key_types) for x in obj.keys()):
          raise ValueError(
              "%skeys must all be strings"
              % ("%s " % desc if desc else "")
          )
      if not all(isinstance(x, value_types) for x in obj.values()):
          raise ValueError(
              "%svalues must all be integers"
              % ("%s " % desc if desc else "")
          )
  
imports: import getpass
  import re
  from _socket import gethostname
  from datetime import datetime
  from typing import Optional, Any
  from ..backend_api.services import projects, queues
  from ..debugging.log import get_logger, LoggerRoot
label_desc: Use image node_id 12 for calling a global function with example usage: validate_dict(obj, key_types, value_types, desc) without return types