code: def _convert_deep(x, enc, convert, relaxed=True):
      if x is None:
          return None
      if isinstance(x, (six.text_type, six.binary_type)):
          return convert(x, enc)
      if isinstance(x, dict):
          return {
              convert(k, enc): _convert_deep(v, enc, convert, relaxed)
              for k, v in six.iteritems(x)
          }
      if isinstance(x, list):
          return [_convert_deep(e, enc, convert, relaxed) for e in x]
      if isinstance(x, tuple):
          return tuple(
              [_convert_deep(e, enc, convert, relaxed) for e in x]
          )
  
      if relaxed:
          return x
      raise TypeError("unsupported type")
  
imports: import locale
  import logging
  import six
  import sys
  import codecs
  import library.python.func
label_desc: Use image node_id 5 for calling a global function with example usage: _convert_deep(x, enc, convert, relaxed) and returns: None, convert, unknown, unknown, tuple, x