def create_module_item(self, module_item, **kwargs):
if isinstance(module_item, dict) and '<STR_LIT:type>' in module_item:<EOL><INDENT>if '<STR_LIT>' in module_item:<EOL><INDENT>kwargs['<STR_LIT>'] = module_item<EOL><DEDENT>else:<EOL><INDENT>raise RequiredFieldMissing("<STR_LIT>")<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise RequiredFieldMissing("<STR_LIT>")<EOL><DEDENT>response = self._requester.request(<EOL>'<STR_LIT:POST>',<EOL>'<STR_LIT>'.format(self.course_id, self.id),<EOL>_kwargs=combine_kwargs(**kwargs)<EOL>)<EOL>module_item_json = response.json()<EOL>module_item_json.update({'<STR_LIT>': self.course_id})<EOL>return ModuleItem(self._requester, module_item_json)<EOL>
Create a module item.

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

:param module_item: The attributes to create the module item with.
:type module_item: dict
:returns: The created module item.
:rtype: :class:`canvasapi.module.ModuleItem`