code: def test_get_redirect_url_max_hops_exceeded(self, mocker):
      url = "https://url.org"
      redirect_url = "https://redirect.url.org"
  
      mock = patch_url_redirection(mocker, redirect_url)
  
      with pytest.raises(RecursionError):
          utils._get_redirect_url(url, max_hops=0)
  
      assert mock.call_count == 1
      assert mock.call_args[0][0].full_url == url
  
imports: import contextlib
  import gzip
  import os
  import pathlib
  import re
  import tarfile
  import zipfile
  import pytest
  import torch
  import torchvision.datasets.utils
  from common_utils import assert_equal
  from torch._utils_internal import get_file_path_2
  from torchvision.datasets.folder import make_dataset
  from torchvision.datasets.utils import _COMPRESSED_FILE_OPENERS
label_desc: Use image node_id 2 for calling the TestDatasetsUtils obj's underlying member method code with example usage: obj.test_get_redirect_url_max_hops_exceeded(mocker) without return types