def create_version(self, project_id, model_name, version_spec):
parent_name = '<STR_LIT>'.format(project_id, model_name)<EOL>create_request = self._mlengine.projects().models().versions().create(<EOL>parent=parent_name, body=version_spec)<EOL>response = create_request.execute()<EOL>get_request = self._mlengine.projects().operations().get(<EOL>name=response['<STR_LIT:name>'])<EOL>return _poll_with_exponential_delay(<EOL>request=get_request,<EOL>max_n=<NUM_LIT:9>,<EOL>is_done_func=lambda resp: resp.get('<STR_LIT>', False),<EOL>is_error_func=lambda resp: resp.get('<STR_LIT:error>', None) is not None)<EOL>
Creates the Version on Google Cloud ML Engine.

Returns the operation if the version was created successfully and
raises an error otherwise.