code: def listify_tensors(x):
      """Convert any tensors or numpy arrays to lists for config serialization."""
      if tf.is_tensor(x):
          x = x.numpy()
      if isinstance(x, np.ndarray):
          x = x.tolist()
      return x
  
imports: import collections
  import numpy
  from keras import backend
  from keras.layers.layer import Layer
  from keras.utils import argument_validation
  from keras.utils import tf_utils
  from keras.utils.module_utils import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: listify_tensors(x) and returns: x