#NEWLINE# @ classmethod #NEWLINE# @ gen . coroutine #NEWLINE# def CreateNew( cls , client , **ep_dict ) : #NEWLINE# #INDENT# "Creates the episode specified by 'ep_dict'. The caller is responsible for checking\n    permission to do this, as well as ensuring that the episode does not yet exist (or is\n    just being identically rewritten).\n\n    Returns: The created episode.\n    " #NEWLINE# assert ( ( 'episode_id' in ep_dict ) and ( 'user_id' in ep_dict ) and ( 'viewpoint_id' in client ) ) , ep_dict #NEWLINE# assert ( 'timestamp' in ep_dict ) , ( 'timestamp attribute required in episode: "%s"' % ep_dict ) #NEWLINE# assert ( 'publish_timestamp' in ep_dict ) , ( 'publish_timestamp attribute required in episode: "%s"' % ep_dict ) #NEWLINE# episode = Episode . CreateFromKeywords ( ** ep_dict ) #NEWLINE# ( yield gen . Task ( episode . Update , client ) ) #NEWLINE# raise gen . Return ( episode )