code: def test_naive_ftp_adapter():
      sender = _utils._NaiveFTPAdapter()
      resp = sender.send(
          requests.Request("GET", "ftp://example.com").prepare()
      )
      resp.close()
      resp.raw.close.assert_called_with()
      urllib.request.OpenerDirector.open.side_effect = (
          urllib.error.URLError("timeout")
      )
      with pytest.raises(requests.RequestException, match="timeout"):
          resp = sender.send(
              requests.Request("GET", "ftp://example.com").prepare()
          )
  
imports: import contextlib
  import gzip
  import os
  import shutil
  import tarfile
  import urllib
  import zipfile
  from tempfile import mkdtemp, mkstemp
  from unittest.mock import MagicMock
  import numpy
  import pytest
  import requests
  from nilearn.datasets import _utils
  from nilearn.datasets import utils
label_desc: Use image node_id 17 for calling a global function with example usage: test_naive_ftp_adapter() without return types