code: def generate(self, api):
          
          for namespace in api.namespaces.values():
              # One module per namespace is created. The module takes the name
              # of the namespace.
              with self.output_to_relative_path('{}.py'.format(namespace.name)):
                  self._generate_namespace_module(namespace)
docs: Generates a module for each namespace.