#NEWLINE# def BuildServiceStub( self , cls ) : #NEWLINE# #INDENT# 'Constructs the stub class.\n\n    Args:\n      cls: The class that will be constructed.\n    ' #NEWLINE# def _ServiceStubInit( stub , rpc_channel ) : #NEWLINE# #INDENT# stub . rpc_channel = rpc_channel #NEWLINE# #UNINDENT# self . cls = cls #NEWLINE# cls . __init__ = _ServiceStubInit #NEWLINE# for method in self . descriptor . methods : #NEWLINE# #INDENT# setattr ( cls , self . name , self . _GenerateStubMethod ( method ) )