if data is instance of Node and data.negated is false, and if data.connector equals conn_type or length of data equals integer 1,
if ( isinstance ( data , Node ) and not data . negated and ( data . connector == conn_type or len ( data ) == 1 ) ) :