def create_assignment(self, assignment, **kwargs):
from canvasapi.assignment import Assignment<EOL>if isinstance(assignment, dict) and '<STR_LIT:name>' in assignment:<EOL><INDENT>kwargs['<STR_LIT>'] = assignment<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>return Assignment(self._requester, response.json())<EOL>
Create a new assignment for this course.

Note: The assignment is created in the active state.

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

:param assignment: The attributes of the assignment
:type assignment: dict
:rtype: :class:`canvasapi.assignment.Assignment`