if DLL is empty or if it contains only a single node
if ( ( head_ref ) == None or ( head_ref ) . next == None ) : NEW_LINE INDENT return head_ref NEW_LINE DEDENT ptr1 = head_ref NEW_LINE ptr2 = None NEW_LINE