def finalize(self):
if self.__head_less:<EOL><INDENT>warn(f'<STR_LIT>')<EOL><DEDENT>elif not self.__head_generate:<EOL><INDENT>warn(f'<STR_LIT>')<EOL><DEDENT>elif not self.__head_dict:<EOL><INDENT>raise NotFittedError(f'<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>if self.remove_rare_ratio:<EOL><INDENT>self.__clean_head(*self.__head_rare)<EOL>self.__prepare_header()<EOL>self.__head_rare = None<EOL><DEDENT>self.__head_generate = False<EOL><DEDENT>
finalize partial fitting procedure