code: def hourglass_module(
      inputs, depth=0, deconv="bilinear", bottleneck="bottleneck"
  ):
      bm_fn = globals()["%s_module" % bottleneck]
  
      with tf.variable_scope("depth_{}".format(depth)):
          # buttom up layers
          net = slim.max_pool2d(inputs, [2, 2], scope="pool")
          net = slim.stack(
              net,
              bm_fn,
              [(256, None), (256, None), (256, None)],
              scope="buttom_up",
          )
  
          # connecting layers
          if depth > 0:
              net = hourglass_module(
                  net, depth=depth - 1, deconv=deconv
              )
          else:
              net = bm_fn(
                  net, out_channel=512, res=512, scope="connecting"
              )
  
          # top down layers
          net = bm_fn(net, out_channel=512, res=512, scope="top_down")
          net = deconv_layer(net, 2, 512, method=deconv)
          # residual layers
          net += slim.stack(
              inputs,
              bm_fn,
              [(256, None), (256, None), (512, 512)],
              scope="res",
          )
  
          return net
  
file_path: insightface/reconstruction/ostec/external/landmark_detector/models.py
imports: import tensorflow
  import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: hourglass_module(inputs, depth, deconv, bottleneck) and returns: net