class_docstr: Accept Python dict values.
  
  If a default value is passed in, then a shallow copy of it will be
  used for each new use of this property.
class_docstr_tok: ["Accept","Python","dict","values",".","If","a","default","value","is","passed","in",",","then","a","shallow","copy","of","it","will","be","used","for","each","new","use","of","this","property","."]
code: def validate(self, value: Any, detail: bool = True) -> None:
      super().validate(value, detail)
  
      key_is_valid = self.keys_type.is_valid
      value_is_valid = self.values_type.is_valid
      expected = f"expected a dict of type {self}"
  
      if not isinstance(value, dict):
          raise ValueError(
              f"{expected}, got a value of type {type(value)}"
              if detail
              else ""
          )
  
      bad_keys = [str(k) for k in value if not key_is_valid(k)]
      bad_value_keys = [
          str(k) for (k, v) in value.items() if not value_is_valid(v)
      ]
      exception_header = f"{expected}, got a dict with"
      bad_keys_str = f"invalid keys: {', '.join(bad_keys)}"
      bad_value_keys_str = (
          f"invalid values for keys: {', '.join(bad_value_keys)}"
      )
      err = None
      if (has_bad_keys := any(bad_keys)) & (
          has_bad_key_values := any(bad_value_keys)
      ):
          err = ValueError(
              f"{exception_header} {bad_keys_str} and {bad_value_keys_str}"
          )
      elif has_bad_keys:
          err = ValueError(f"{exception_header} {bad_keys_str}")
      elif has_bad_key_values:
          err = ValueError(f"{exception_header} {bad_value_keys_str}")
      if err:
          raise err if detail else ValueError("")
  
imports: from __future__ import annotations
  import logging
  from collections.abc import Container, Iterable, Mapping, Sequence, Sized
  from typing import TYPE_CHECKING, Any, TypeVar
  from ._sphinx import property_link, register_type_link, type_link
  from .bases import ContainerProperty, Init, Property, SingleParameterizedProperty, TypeOrInst
  from .descriptors import ColumnDataPropertyDescriptor
  from .enum import Enum
  from .numeric import Int
  from .singletons import Intrinsic, Undefined
  from .wrappers import PropertyValueColumnData, PropertyValueDict, PropertyValueList, PropertyValueSet
label_desc: Use image node_id 4 for calling the Dict obj's underlying member method code with example usage: obj.validate(value, detail) without return types