code: def test_version_url_deleted():
      get_test_providers(
          "s3://datalad-test0-versioned/", reload=True
      )  # to verify having credentials to access
      # openfmri via S3
      # it existed and then was removed
      fpath = "1version-removed.txt"
      url = "http://datalad-test0-versioned.s3.amazonaws.com/%s" % fpath
      turl = (
          "http://datalad-test0-versioned.s3.amazonaws.com/%s"
          "?versionId=eZ5Hgwo8azfBv3QT7aW9dmm2sbLUY.QP" % fpath
      )
      eq_(get_versioned_url(url), turl)
  
imports: from datalad.downloaders.tests.utils import get_test_providers
  from datalad.support.network import URL
  from datalad.support.s3 import add_version_to_url, get_versioned_url
  from datalad.tests.utils_pytest import assert_raises, eq_, ok_startswith, skip_if_no_network, use_cassette
label_desc: Use image node_id 4 for calling a global function with example usage: test_version_url_deleted() without return types