code: def _sfdp_scale_factor_check(scale_factor_op):
      def fn(match):
          scale_factor_node = filter_nodes(
              match.nodes, scale_factor_op
          )[0]
          # Note: args[1] of the scale_factor_node is always the scale_factor for the current patterns.
          scale_factor = scale_factor_node.args[1]
          # make sure the scale_factor a float/int. SymInt?
          if not isinstance(scale_factor, (float, int)):
              return False
          return _sfdp_params_check(match)
  
      return fn
  
imports: import functools
  import inspect
  import logging
  import math
  import torch
  from ..._dynamo.utils import counters
  from ..pattern_matcher import filter_nodes, fwd_only, joint_fwd_bwd, register_replacement
label_desc: Use image node_id 28 for calling a global function with example usage: _sfdp_scale_factor_check(scale_factor_op) and returns: fn, _sfdp_params_check, False