import tensorflow as tf



def static_shape(tensor):
  return tensor.get_shape().as_list()


def static_rank(tensor):
  return len(static_shape(tensor))

@@ -1,8 +1,25 @@
+import functools%0A
 import t
@@ -163,8 +163,188 @@
 ensor))%0A
+%0A%0Adef funcname_scope(func):%0A  @functools.wraps(func)%0A  def wrapper(*args, **kwargs):%0A    with tf.variable_scope(func.__name__):%0A      return func(*args, **kwargs)%0A  return wrapper%0A

Add funcname_scope() function decorator