code: def monkeypatch_tf_layers():
      if get_tf_version_tuple() < (1, 4):
          if not hasattr(tf.layers, "Dense"):
              from tensorflow.python.layers.core import Dense
  
              tf.layers.Dense = Dense
  
              from tensorflow.python.layers.normalization import (
                  BatchNormalization,
              )
  
              tf.layers.BatchNormalization = BatchNormalization
  
              from tensorflow.python.layers.convolutional import (
                  Conv2DTranspose,
                  Conv2D,
              )
  
              tf.layers.Conv2DTranspose = Conv2DTranspose
              tf.layers.Conv2D = Conv2D
  
              from tensorflow.python.layers.pooling import (
                  MaxPooling2D,
                  AveragePooling2D,
              )
  
              tf.layers.MaxPooling2D = MaxPooling2D
              tf.layers.AveragePooling2D = AveragePooling2D
  
file_path: tensorpack/tensorpack/models/tflayer.py
imports: import functools
  import six
  import tensorflow
  from ..tfutils.common import get_tf_version_tuple
  from ..tfutils.varreplace import custom_getter_scope
  from ..utils.argtools import get_data_format
label_desc: Use image node_id 5 for calling a global function with example usage: monkeypatch_tf_layers() without return types