code: def remove(x, f):
      if f < 2:
          raise ValueError("factor must be > 1")
      if x == 0:
          return 0, 0
      if f == 2:
          b = bit_scan1(x)
          return x >> b, b
      m = 0
      y, rem = divmod(x, f)
      while not rem:
          x = y
          m += 1
          if m > 5:
              pow_list = [f**2]
              while pow_list:
                  _f = pow_list[-1]
                  y, rem = divmod(x, _f)
                  if not rem:
                      m += 1 << len(pow_list)
                      x = y
                      pow_list.append(_f**2)
                  else:
                      pow_list.pop()
          y, rem = divmod(x, f)
      return x, m
  
imports: import sys
  import math
  import mpmath.libmp
label_desc: Use image node_id 3 for calling a global function with example usage: remove(x, f) and returns: x,  m, int,  int, unknown,  b