#NEWLINE# def dehydrate_related( self , bundle , related_resource , for_list = True ) : #NEWLINE# #INDENT# '\n        Based on the ``full_resource``, returns either the endpoint or the data\n        from ``full_dehydrate`` for the related resource.\n        ' #NEWLINE# should_dehydrate_full_resource = self . should_full_dehydrate ( bundle , for_list = for_list ) #NEWLINE# if ( not should_dehydrate_full_resource ) : #NEWLINE# #INDENT# return related_resource . get_resource_uri ( bundle ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# bundle = related_resource . build_bundle ( obj = bundle . obj , request = bundle . request , objects_saved = bundle . objects_saved ) #NEWLINE# return related_resource . full_dehydrate ( bundle )