parameters: (self)
return_statement: return dependency_namespaces
docstring: Returns a dict ordered by namespace name containing a mapping of
      model.Namespace to every _TypeDependency for |self._default_namespace|,
      sorted by the type's name.
docstring_summary: Returns a dict ordered by namespace name containing a mapping of
      model.Namespace to every _TypeDependency for |self._default_namespace|,
      sorted by the type's name.
docstring_tokens: Returns a dict ordered by namespace name containing a mapping of model . Namespace to every _TypeDependency for |self . _default_namespace| sorted by the type s name .
function: def _NamespaceTypeDependencies(self):
      """Returns a dict ordered by namespace name containing a mapping of
      model.Namespace to every _TypeDependency for |self._default_namespace|,
      sorted by the type's name.
      """
      dependencies = set()
      for function in self._default_namespace.functions.values():
        for param in function.params:
          dependencies |= self._TypeDependencies(param.type_,
                                                 hard=not param.optional)
        if function.callback:
          for param in function.callback.params:
            dependencies |= self._TypeDependencies(param.type_,
                                                   hard=not param.optional)
      for type_ in self._default_namespace.types.values():
        for prop in type_.properties.values():
          dependencies |= self._TypeDependencies(prop.type_,
                                                 hard=not prop.optional)
      for event in self._default_namespace.events.values():
        for param in event.params:
          dependencies |= self._TypeDependencies(param.type_,
                                                 hard=not param.optional)
  
      # Make sure that the dependencies are returned in alphabetical order.
      dependency_namespaces = OrderedDict()
      for dependency in sorted(dependencies, key=_TypeDependency.GetSortKey):
        namespace = dependency.type_.namespace
        if namespace is self._default_namespace:
          continue
        if namespace not in dependency_namespaces:
          dependency_namespaces[namespace] = []
        dependency_namespaces[namespace].append(dependency)
  
      return dependency_namespaces
function_tokens: def _NamespaceTypeDependencies ( self ) : dependencies = set ( ) for function in self . _default_namespace . functions . values ( ) : for param in function . params : dependencies |= self . _TypeDependencies ( param . type_ , hard = not param . optional ) if function . callback : for param in function . callback . params : dependencies |= self . _TypeDependencies ( param . type_ , hard = not param . optional ) for type_ in self . _default_namespace . types . values ( ) : for prop in type_ . properties . values ( ) : dependencies |= self . _TypeDependencies ( prop . type_ , hard = not prop . optional ) for event in self . _default_namespace . events . values ( ) : for param in event . params : dependencies |= self . _TypeDependencies ( param . type_ , hard = not param . optional ) # Make sure that the dependencies are returned in alphabetical order. dependency_namespaces = OrderedDict ( ) for dependency in sorted ( dependencies , key = _TypeDependency . GetSortKey ) : namespace = dependency . type_ . namespace if namespace is self . _default_namespace : continue if namespace not in dependency_namespaces : dependency_namespaces [ namespace ] = [ ] dependency_namespaces [ namespace ] . append ( dependency ) return dependency_namespaces