class_docstr: Accept values that are structures.
  
  
      
code: def validate(self, value: Any, detail: bool = True):
      super().validate(value, detail)
  
      if isinstance(value, dict) and len(value) <= len(self._fields):
          for name, type in self._fields.items():
              if name not in value:
                  if name not in self._optional:
                      break
              elif not type.is_valid(value[name]):
                  break
          else:
              for name in value.keys():
                  if name not in self._fields:
                      break
              else:
                  return
  
      msg = (
          ""
          if not detail
          else f"expected an element of {self}, got {value!r}"
      )
      raise ValueError(msg)
  
file_path: bokeh/src/bokeh/core/property/struct.py
imports: from __future__ import annotations
  import logging
  from typing import Any, Generic, TypeVar
  from .bases import ParameterizedProperty, Property
label_desc: Use image node_id 4 for calling the Struct obj's underlying member method code with example usage: obj.validate(value, detail) without return types