<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sendrpc(self, argv=[]):

 self._aArgv += argv
 _operation = ''
 try:
 self._cParams.parser(self._aArgv, self._dOptions)
 
 # set rpc operation handler
 while self._cParams.get('operation') not in rpc.operations.keys():

 self._cParams.set('operation', raw_input("Enter RPC Operation:\n%s:" % rpc.operations.keys()))
 
 _operation = self._cParams.get('operation')
 self._hRpcOper = rpc.operations[_operation](opts=self._dOptions)
 # input missing operation parameters
 self._hRpcOper.fill(params=self._cParams.get())
 
 send_msg = self._hRpcOper.readmsg(self._cParams.get())
 self._cParams.set('messageid', self._cParams.get('messageid')+1)
 self._hConn.sendmsg(send_msg)
 self._cParams.set('sendmsg', send_msg)
 
 recv_msg = self._hConn.recvmsg()
 self._cParams.set('recvmsg', recv_msg)
 self._hRpcOper.parsemsg(self._cParams.get())
 self._hRpcOper.writemsg(self._cParams.get())
 
 # reset operation params
 self._cParams.reset()
 except:
 if _operation != 'close-session':
 print 'BNClient: Call sendrpc%s fail' % (' <'+_operation+'>' if len(_operation) else '')
 sys.exit()
 
 """ end of function exchgmsg """