#NEWLINE# def get_valid_dag_node( node ) : #NEWLINE# #INDENT# 'returns a valid dag node even the input is string\n    ' #NEWLINE# try : #NEWLINE# #INDENT# dag_node = pm . nodetypes . DagNode ( node ) #NEWLINE# #UNINDENT# except pm . MayaNodeError : #NEWLINE# #INDENT# print ( ( 'Error: no node named : %s' % node ) ) #NEWLINE# return None #NEWLINE# #UNINDENT# return dag_node