def finalize(self):
    if (self.sm_whitespace.get() is None):
        self.sm_whitespace.set(self.__sm_whitespace_default(), SourceRef_DEFAULT)
    if (self.sm_newline.get() is None):
        self.sm_newline.set(self.__sm_newline_default(), SourceRef_DEFAULT)
    self._consistency_check()

    def get_pattern(SRO):
        if ((SRO is None) or (SRO.get() is None)):
            return None
        return Pattern_Prep(SRO.get(), PatternString=('<indentation %s>' % SRO.name), Sr=SRO.sr)
    pattern_suspend_list = [get_pattern(sro) for sro in self.sm_suspend_list]
    pattern_suspend_list = [x for x in pattern_suspend_list if (x is not None)]
    if self.sm_newline_suppressor.set_f():
        sm_suppressed_newline = sequentialize.do([self.sm_newline_suppressor.get(), self.sm_newline.get()])
        sm_suppressed_newline = beautifier.do(sm_suppressed_newline)
        pattern_suppressed_newline = Pattern_Prep(sm_suppressed_newline, PatternString='<indentation suppressed newline>', Sr=self.sm_newline_suppressor.sr)
    else:
        pattern_suppressed_newline = None
    return IndentationCount_Pre(self.sr, get_pattern(self.sm_whitespace), get_pattern(self.sm_badspace), get_pattern(self.sm_newline), pattern_suppressed_newline, pattern_suspend_list)
def finalize(self):
    if (self.sm_whitespace.get() is None):
        self.sm_whitespace.set(self.__sm_whitespace_default(), SourceRef_DEFAULT)
    if (self.sm_newline.get() is None):
        self.sm_newline.set(self.__sm_newline_default(), SourceRef_DEFAULT)
    self._consistency_check()

    def get_pattern(SRO):
        if ((SRO is None) or (SRO.get() is None)):
            return None
        return Pattern_Prep(SRO.get(), PatternString=('<indentation %s>' % SRO.name), Sr=SRO.sr)
    pattern_suspend_list = [get_pattern(sro) for sro in self.sm_suspend_list]
    pattern_suspend_list = [x for x in pattern_suspend_list if (x is not None)]
    if self.sm_newline_suppressor.set_f():
        sm_suppressed_newline = sequentialize.do([self.sm_newline_suppressor.get(), self.sm_newline.get()])
        sm_suppressed_newline = beautifier.do(sm_suppressed_newline)
        pattern_suppressed_newline = Pattern_Prep(sm_suppressed_newline, PatternString='<indentation suppressed newline>', Sr=self.sm_newline_suppressor.sr)
    else:
        pattern_suppressed_newline = None
    return IndentationCount_Pre(self.sr, get_pattern(self.sm_whitespace), get_pattern(self.sm_badspace), get_pattern(self.sm_newline), pattern_suppressed_newline, pattern_suspend_list)