code: def pow_wrapper(X, p, optype):
      """Wrapper for handling sparse and dense versions of `tf.pow` operation.
  
      Parameters
      ----------
      X : tf.Tensor
      p : int
      optype : str, {'dense', 'sparse'}
  
      Returns
      -------
      tf.Tensor
      """
      with tf.name_scope("pow_wrapper") as scope:
          if optype == "dense":
              return tf.pow(X, p)
          elif optype == "sparse":
              return tf.SparseTensor(
                  X.indices, tf.pow(X.values, p), X.dense_shape
              )
          else:
              raise NameError("Unknown input type in pow_wrapper")
  
file_path: tffm/tffm/utils.py
imports: import math
  import numpy
  import tensorflow
  import itertools
  from itertools import combinations_with_replacement, takewhile, count
  from collections import defaultdict
label_desc: Use image node_id 6 for calling a global function with example usage: pow_wrapper(X, p, optype) and returns: tf, tf