code: def get_max_power2_factor(n, max_value=None):
      """Get max factor of n in power of 2. If max_value is specificed, max factor
      value will be no more max_value,
  
      Parameter
      ---------
      n : int
          The input value
  
      max_value : int, optional
          The max value for the factor
  
      Returns
      -------
      factor : int
          The max factor in power of 2.
      """
      x = 1
      while n % 2 == 0:
          if max_value is not None and max_value < x * 2:
              break
          x *= 2
          n /= 2
      return x
  
imports: from __future__ import absolute_import
  from numbers import Integral
  import numpy
  import tvm
  from tvm import te
  from tvm.tir import Any, SizeVar, bijective_layout, layout
  from .None import cpp, tag
label_desc: Use image node_id 17 for calling a global function with example usage: get_max_power2_factor(n, max_value) and returns: x