def create_module(self, module, **kwargs):
from canvasapi.module import Module<EOL>if isinstance(module, dict) and '<STR_LIT:name>' in module:<EOL><INDENT>kwargs['<STR_LIT>'] = module<EOL><DEDENT>else:<EOL><INDENT>raise RequiredFieldMissing("<STR_LIT>")<EOL><DEDENT>response = self._requester.request(<EOL>'<STR_LIT:POST>',<EOL>'<STR_LIT>'.format(self.id),<EOL>_kwargs=combine_kwargs(**kwargs)<EOL>)<EOL>module_json = response.json()<EOL>module_json.update({'<STR_LIT>': self.id})<EOL>return Module(self._requester, module_json)<EOL>
Create a new module.

:calls: `POST /api/v1/courses/:course_id/modules \
<https://canvas.instructure.com/doc/api/modules.html#method.context_modules_api.create>`_

:param module: The attributes for the module.
:type module: dict
:returns: The created module.
:rtype: :class:`canvasapi.module.Module`