<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_nodes(code, desired_type, path="__main__", mode="exec", tree=None):
 """Find all nodes of a given type Arguments: code -- code text desired_type -- ast Node or tuple Keyword Arguments: path -- code path mode -- execution mode (exec, eval, single) tree -- current tree, if it was optimized """

    return _GetVisitor(parse(code, path, mode, tree), desired_type).result