def get_or_create_node(title, user):
 try:
  node = Node.find_one((Q('title', 'iexact', title) & Q('contributors', 'eq', user)))
  return (node, False)
 except ModularOdmException:
  node = new_node('project', title, user)
  return (node, True)

def get_or_create_node ( title , user ) : try : node = Node . find_one ( ( Q ( 'title' , 'iexact' , title ) & Q ( 'contributors' , 'eq' , user ) ) ) return ( node , False ) except ModularOdmException : node = new_node ( 'project' , title , user ) return ( node , True )
get or create node by title and creating user .