code: def map_common_tfargs(kwargs):
      df = kwargs.pop("data_format", None)
      if df is not None:
          df = get_data_format(df, keras_mode=True)
          kwargs["data_format"] = df
  
      old_nl = kwargs.pop("nl", None)
      if old_nl is not None:
          kwargs["activation"] = lambda x, name=None: old_nl(
              x, name=name
          )
  
      if "W_init" in kwargs:
          kwargs["kernel_initializer"] = kwargs.pop("W_init")
  
      if "b_init" in kwargs:
          kwargs["bias_initializer"] = kwargs.pop("b_init")
      return kwargs
  
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 1 for calling a global function with example usage: map_common_tfargs(kwargs) and returns: kwargs