if ' x / p _ product ' is present in ' um ' and either of the two nodes are not equal to the ' um [ x / p _ product ] ' node
if ( ( x / p_product ) in um and ( x / p_product ) != ptr1 and um [ x / p_product ] != ptr2 ) : NEW_LINE