def _remove_complex_types(dictionary):
 for (k, v) in six.iteritems(dictionary):
  if isinstance(v, dict):
   dictionary[k] = _remove_complex_types(v)
  elif hasattr(v, 'to_eng_string'):
   dictionary[k] = v.to_eng_string()
 return dictionary

def _remove_complex_types ( dictionary ) : for ( k , v ) in six . iteritems ( dictionary ) : if isinstance ( v , dict ) : dictionary [ k ] = _remove_complex_types ( v ) elif hasattr ( v , 'to_eng_string' ) : dictionary [ k ] = v . to_eng_string ( ) return dictionary
linode-python is now returning some complex types that are not serializable by msgpack .