class_docstr: Give up the sample if the result of the profiler is out of range.
  
  ``min`` and ``max`` can't be both None.
  
  Parameters
  ----------
  profiler
      The profiler which is used to profile the sample.
  min
      The lower bound of the profiler result. None means no minimum.
  max
      The upper bound of the profiler result. None means no maximum.
class_docstr_tok: ["Give","up","the","sample","if","the","result","of","the","profiler","is","out","of","range",".","``","min","``","and","``","max","``","ca","n't","be","both","None",".","Parameters","--","--","--","--","--","profiler","The","profiler","which","is","used","to","profile","the","sample",".","min","The","lower","bound","of","the","profiler","result",".","None","means","no","minimum",".","max","The","upper","bound","of","the","profiler","result",".","None","means","no","maximum","."]
code: def filter(self, sample: Sample) -> bool:
      value = self.profiler.profile(sample)
      if self.min_value is not None and value < self.min_value:
          _logger.debug(
              "Profiler returns %f (smaller than %f) for sample: %s",
              value,
              self.min_value,
              sample,
          )
          return False
      if self.max_value is not None and value > self.max_value:
          _logger.debug(
              "Profiler returns %f (larger than %f) for sample: %s",
              value,
              self.max_value,
              sample,
          )
          return False
      return True
  
imports: from __future__ import annotations
  import logging
  from typing import cast
  from typing_extensions import Literal
  import numpy
  import torch
  from torch import nn
  from nni.mutable import Sample
  from nni.nas.profiler import Profiler, ExpressionProfiler
  from .supermodule._expression_utils import expression_expectation
label_desc: Use image node_id 2 for calling the RangeProfilerFilter obj's underlying member method code with example usage: obj.filter(sample) and returns: True, False, False