code: def remove_files_from_dict(d):
      
      file_free = {}
      for key, value in six.iteritems(d):
          if isinstance(value, dict):
              file_free[key] = remove_files_from_dict(value)
          elif not is_file_like(value):
              if hasattr(value, '__iter__'):
                  file_free[key] = value
              else:
                  if hasattr(value, 'encode'):
                      file_free[key] = value.encode('utf-8')
                  else:
                      file_free[key] = str(value)
      return file_free
docs: Return the provided dict with any file objects removed.
  
      >>> remove_files_from_dict({
      ...   'oauth_token': 'foo',
      ...   'track': {
      ...       'title': 'bar',
      ...       'asset_data': open('setup.py', 'rb')
      ...   }
      ... }) == {'track': {'title': 'bar'}, 'oauth_token': 'foo'}
      ... # doctest:+ELLIPSIS
      True