def find_method(rpc_call):
 method_lists = [rtorrent.methods, rtorrent.file.methods, rtorrent.tracker.methods, rtorrent.peer.methods, rtorrent.torrent.methods]
 for l in method_lists:
  for m in l:
   if (m.rpc_call.lower() == rpc_call.lower()):
    return m
 return (-1)

def find_method ( rpc_call ) : method_lists = [ rtorrent . methods , rtorrent . file . methods , rtorrent . tracker . methods , rtorrent . peer . methods , rtorrent . torrent . methods ] for l in method_lists : for m in l : if ( m . rpc_call . lower ( ) == rpc_call . lower ( ) ) : return m return ( - 1 )
return l{method} instance associated with given rpc call .