#NEWLINE# def vm_ref_or_raise( session , instance_name ) : #NEWLINE# #INDENT# vm_ref = lookup ( session , session ) #NEWLINE# if ( vm_ref is None ) : #NEWLINE# #INDENT# raise exception . InstanceNotFound ( instance_id = instance_name ) #NEWLINE# #UNINDENT# return vm_ref