def generate(self, api):
        """
        Generates a module for each namespace.

        Each namespace will have Python classes to represent data types and
        routes in the Stone spec.
        """
        rsrc_folder = os.path.join(os.path.dirname(__file__), 'python_rsrc')
        self.logger.info('Copying stone_validators.py to output folder')
        shutil.copy(os.path.join(rsrc_folder, 'stone_validators.py'),
                    self.target_folder_path)
        self.logger.info('Copying stone_serializers.py to output folder')
        shutil.copy(os.path.join(rsrc_folder, 'stone_serializers.py'),
                    self.target_folder_path)
        self.logger.info('Copying stone_base.py to output folder')
        shutil.copy(os.path.join(rsrc_folder, 'stone_base.py'),
                    self.target_folder_path)
        for namespace in api.namespaces.values():
            reserved_namespace_name = fmt_namespace(namespace.name)
            with self.output_to_relative_path('{}.py'.format(reserved_namespace_name)):
                self._generate_base_namespace_module(api, namespace)
            if reserved_namespace_name != namespace.name:
                with self.output_to_relative_path('{}.py'.format(namespace.name)):
                    self._generate_dummy_namespace_module(reserved_namespace_name)
Generates a module for each namespace.

        Each namespace will have Python classes to represent data types and
        routes in the Stone spec.