code: def validate_registry(registry):
      for page in registry.values():
          if "layout" not in page:
              raise exceptions.NoLayoutException(
                  f"No layout in module `{page['module']}` in dash.page_registry"
              )
          if page["module"] == "__main__":
              raise Exception(
                  """
                  When registering pages from app.py, `__name__` is not a valid module name.  Use a string instead.
                  For example, `dash.register_page("my_module_name")`, rather than `dash.register_page(__name__)`
                  """
              )
  
imports: from collections.abc import MutableSequence
  import re
  from textwrap import dedent
  from keyword import iskeyword
  import flask
  from ._grouping import grouping_len, map_grouping
  from .development.base_component import Component
  from .None import exceptions
  from ._utils import patch_collections_abc, stringify_id, to_json, coerce_to_list, clean_property_name
label_desc: Use image node_id 16 for calling a global function with example usage: validate_registry(registry) without return types