docs: def _encode_data(data):
          """URL encode data."""
          data = data if data is not None else {}
          data = to_nested_php_args(data)
          files = dict([
              (key, value) for key, value in
              data.items() if isinstance(value, file_type)])
          for fname in files:
              del data[fname]
          return data, files or None, None