class_docstr: For some ops that will not produce masks.
class_docstr_tok: ["For","some","ops","that","will","not","produce","masks","."]
docstr: the default MaskUpdater for operators that will not change mask value
docstr_tok: ["the","default","MaskUpdater","for","operators","that","will","not","change","mask","value"]
code: def detect(self, model_speedup: "ModelSpeedup", node: Node) -> bool:
      """
      the default MaskUpdater for operators that will not change mask value
      """
      if node.op == "call_function":
          if node.target in (
              len,
              operator.is_,
              operator.is_not,
              operator.contains,
          ):
              return True
      elif node.op == "call_method":
          if isinstance(node.args[0], Node) and isinstance(
              model_speedup.node_infos[node.args[0]].output_origin,
              torch.Tensor,
          ):
              if node.target in ("dim", "size"):
                  return True
      return False
  
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Tuple
  import operator
  import torch
  from torch.nn import functional
  from torch.fx.node import Node
  from torch.utils._pytree import tree_flatten, tree_unflatten
  from .utils import randomize_tensor_inplace, randomize_if_tensor, tree_map_zip, torch_float_dtype, poss_deepcopy
label_desc: Use image node_id 1 for calling the NoMaskUpdater obj's underlying member method code with example usage: obj.detect(model_speedup, node) and returns: False, True, True