def make_insecure_stub(stub_class, host, port=None):
 if (port is None):
  target = host
 else:
  target = ('%s:%d' % (host, port))
 channel = grpc.insecure_channel(target)
 return stub_class(channel)

def make_insecure_stub ( stub_class , host , port = None ) : if ( port is None ) : target = host else : target = ( '%s:%d' % ( host , port ) ) channel = grpc . insecure_channel ( target ) return stub_class ( channel )
makes an insecure stub for an rpc service .