code: def test_Providers_default_ones():
      providers = Providers()  # empty one
  
      # should return default one
      http_provider = providers.get_provider("http://example.com")
      # which must be the same if asked for another one of http
      http_provider2 = providers.get_provider("http://datalad.org")
      assert http_provider is http_provider2
  
      # but for another protocol, we would generate a new one
      crap_provider = providers.get_provider("crap://crap.crap")
      assert crap_provider is not http_provider
      assert isinstance(crap_provider, Provider)
  
file_path: datalad/datalad/downloaders/tests/test_providers.py
imports: import logging
  import os.path
  from unittest.mock import patch
  from ...support.external_versions import external_versions
  from ...tests.utils_pytest import assert_equal, assert_false, assert_greater, assert_in, assert_raises, ok_exists, swallow_logs, with_tempfile, with_testsui, with_tree
  from ...utils import chpwd, create_tree
  from ..providers import HTTPDownloader, Provider, Providers
label_desc: Use image node_id 2 for calling a global function with example usage: test_Providers_default_ones() without return types