#NEWLINE# @ classmethod #NEWLINE# @ gen . coroutine #NEWLINE# def CreateDefault( cls , client , user_id , device_id , timestamp ) : #NEWLINE# #INDENT# "Creates and returns a new user's default viewpoint." #NEWLINE# from viewfinder.backend.db.user import User #NEWLINE# vp_dict = { #NEWLINE# #INDENT# 'viewpoint_id' : Viewpoint . ConstructViewpointId ( device_id , User . DEFAULT_VP_ASSET_ID ) , #NEWLINE# 'user_id' : user_id , #NEWLINE# 'timestamp' : timestamp , #NEWLINE# 'type' : Viewpoint . DEFAULT , #NEWLINE# #UNINDENT# } #NEWLINE# ( viewpoint , _ ) = ( yield gen . Task ( Viewpoint . CreateNew , client , ** vp_dict ) ) #NEWLINE# raise gen . Return ( viewpoint )