code: def transition(x, reduction=0.5, scope=None):
      x = batch_norm(x)
      x = relu(x)
      infilters = (
          int(x.shape[-1]) if tf_later_than("2") else x.shape[-1].value
      )
      x = conv2d(x, int(infilters * reduction), 1, stride=1)
      x = avg_pool2d(x, 2, stride=2, scope="pool")
      return x
  
file_path: tensornets/tensornets/densenets.py
imports: from __future__ import absolute_import
  import tensorflow
  from .layers import avg_pool2d
  from .layers import batch_norm
  from .layers import conv2d
  from .layers import fc
  from .layers import max_pool2d
  from .layers import convbnrelu
  from .ops import *
  from .utils import pad_info
  from .utils import set_args
  from .utils import var_scope
label_desc: Use image node_id 7 for calling a global function with example usage: transition(x, reduction, scope) and returns: x