def get_varname(rpc_call):
 r = re.search('([ptdf]\\.|system\\.|get\\_|is\\_|set\\_)+([^=]*)', rpc_call, re.I)
 if r:
  return r.groups()[(-1)]
 else:
  return None

def get_varname ( rpc_call ) : r = re . search ( '([ptdf]\\.|system\\.|get\\_|is\\_|set\\_)+([^=]*)' , rpc_call , re . I ) if r : return r . groups ( ) [ ( - 1 ) ] else : return None
transform rpc method into variable name .