code: def test_download_ftp():
      try:
          import requests_ftp
      except ImportError:
          raise SkipTest(
              "need requests_ftp"
          )  # TODO - make it not ad-hoc
      try:
          check_download_external_url(
              "ftp://ftp.gnu.org/README", None, "This is ftp.gnu.org"
          )
      except AccessFailedError as exc:  # pragma: no cover
          if "status code 503" in str(exc):
              raise SkipTest(
                  "ftp.gnu.org throws 503 when on travis (only?)"
              )
          raise
  
imports: import builtins
  import os
  import re
  import time
  from calendar import timegm
  from os.path import join
  from datalad.downloaders.tests.utils import get_test_providers
  from datalad.support.network import download_url, get_url_straight_filename
  from datalad.utils import ensure_unicode
  from ...support.exceptions import AccessFailedError
  from ..base import BaseDownloader, DownloadError, IncompleteDownloadError, NoneAuthenticator
  from ..credentials import LORIS_Token, Token, UserPassword
  from ..http import HTMLFormAuthenticator, HTTPBaseAuthenticator, HTTPBearerTokenAuthenticator, HTTPDownloader, process_www_authenticate
  from unittest.mock import patch
  from ...support.exceptions import AccessDeniedError, AnonymousAccessDeniedError
  from ...support.network import get_url_disposition_filename
  from ...support.status import FileStatus
  from ...tests.utils_pytest import SkipTest, assert_equal, assert_false, assert_greater, assert_in, assert_not_in, assert_raises, known_failure_githubci_win, ok_file_has_content, serve_path_via_http, skip_if, skip_if_no_network, swallow_logs, swallow_outputs, use_cassette, with_fake_cookies_db, with_memory_keyring, with_tempfile, with_testsui, with_tree, without_http_proxy
  from ...utils import read_file
label_desc: Use image node_id 12 for calling a global function with example usage: test_download_ftp() without return types