def filter(self, given_filter, apply_zerovalue=False):
get_ = self.get___method<EOL>set_ = self.set___method<EOL>max_value = self.max_value<EOL>for table_id in range(self.depth):<EOL><INDENT>for cell_id in range(self.width):<EOL><INDENT>val = get_(self, table_id, cell_id)<EOL>if val or apply_zerovalue:<EOL><INDENT>val = given_filter(val)<EOL>val = max_value if val > max_value else val<EOL>set_(self, table_id, cell_id, val)<EOL><DEDENT><DEDENT><DEDENT>
Apply filter into all values
        Params
            <lambda> | <function> given_filter
            <bool> only_nonzero