code: def _test_percentile_after_mask(self):
      f_input = eye(5)
      g_input = arange(25, dtype=float).reshape(5, 5)
      initial_mask = self.build_mask(ones((5, 5)))
  
      custom_mask = self.f < 1
      without_mask = self.g.percentile_between(80, 100)
      with_mask = self.g.percentile_between(80, 100, mask=custom_mask)
  
      terms = {
          "mask": custom_mask,
          "without_mask": without_mask,
          "with_mask": with_mask,
      }
      expected = {
          # Mask that accepts everything except the diagonal.
          "mask": ~eye(5, dtype=bool),
          # Second should pass the largest value each day.  Each row is
          # strictly increasing, so we always select the last value.
          "without_mask": array(
              [
                  [0, 0, 0, 0, 1],
                  [0, 0, 0, 0, 1],
                  [0, 0, 0, 0, 1],
                  [0, 0, 0, 0, 1],
                  [0, 0, 0, 0, 1],
              ],
              dtype=bool,
          ),
          # With a mask, we should remove the diagonal as an option before
          # computing percentiles.  On the last day, we should get the
          # second-largest value, rather than the largest.
          "with_mask": array(
              [
                  [0, 0, 0, 0, 1],
                  [0, 0, 0, 0, 1],
                  [0, 0, 0, 0, 1],
                  [0, 0, 0, 0, 1],
                  [0, 0, 0, 1, 0],
              ],  # Different from with!
              dtype=bool,
          ),
      }
  
      self.check_terms(
          terms,
          expected,
          initial_workspace={self.f: f_input, self.g: g_input},
          mask=initial_mask,
      )
  
imports: from functools import partial
  from itertools import product
  from operator import and_
  from toolz import compose
  from numpy import arange, argsort, array, eye, float64, full, inf, isfinite, nan, nanpercentile, ones, ones_like, putmask, rot90, sum
  from numpy.random import randn, seed
  import pandas
  from catalyst.errors import BadPercentileBounds
  from catalyst.pipeline import Filter, Factor, Pipeline
  from catalyst.pipeline.classifiers import Classifier
  from catalyst.pipeline.factors import CustomFactor
  from catalyst.pipeline.filters import All, Any, AtLeastN, StaticAssets, StaticSids
  from catalyst.testing import parameter_space, permute_rows, CatalystTestCase
  from catalyst.testing.fixtures import WithSeededRandomPipelineEngine
  from catalyst.testing.predicates import assert_equal
  from catalyst.utils.numpy_utils import float64_dtype, int64_dtype
  from .base import BasePipelineTestCase, with_default_shape
label_desc: Use image node_id 7 for calling the FilterTestCase obj's underlying member method code with example usage: obj._test_percentile_after_mask() without return types