def is_shared_variable(variable):
 return (isinstance(variable, SharedVariable) and (not isinstance(variable, RandomStateSharedVariable)) and (not hasattr(variable.tag, 'is_rng')))

def is_shared_variable ( variable ) : return ( isinstance ( variable , SharedVariable ) and ( not isinstance ( variable , RandomStateSharedVariable ) ) and ( not hasattr ( variable . tag , 'is_rng' ) ) )
check if a variable is a theano shared variable .