<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_include(self, name, module_spec):
 """Adds a module as an included module. :param name: Name under which the included module should be exposed in the current module. :param module_spec: ModuleSpec of the included module. """

        assert name, 'name is required'
        assert self.can_include

        if name in self.includes:
            raise ThriftCompilerError(
                'Cannot include module "%s" as "%s" in "%s". '
                'The name is already taken.'
                % (module_spec.name, name, self.path)
            )

        self.includes[name] = module_spec
        self.scope.add_include(name, module_spec.scope, module_spec.surface)