#NEWLINE# def installed( name , version = None , refresh = False , fromrepo = None , skip_verify = False , pkgs = None , sources = None , **kwargs ) : #NEWLINE# #INDENT# p = __proxy__ [ 'rest_sample.package_status' ] ( name ) #NEWLINE# if ( version is None ) : #NEWLINE# #INDENT# if ( 'ret' in p ) : #NEWLINE# #INDENT# return str ( p [ 'ret' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( p is not None ) : #NEWLINE# #INDENT# return ( version == str ( p ) )