code: def tolist(tensors):
      if isinstance(tensors, list) or isinstance(tensors, tuple):
          ntensors = list()
          for t in tensors:
              ntensors += tolist(t)
          return ntensors
      else:
          return [tensors]
  
imports: import inspect
  from abc import abstractmethod
  import tensorflow
  import tensorlayer
  from tensorlayer import logging
  from tensorlayer.decorators import deprecated_alias, private_method, protected_method
  from tensorlayer.files import utils
  from tensorlayer.layers.utils import get_variable_with_initializer, list_remove_repeat
label_desc: Use image node_id 3 for calling a global function with example usage: tolist(tensors) and returns: ntensors, list