code: def _recurse_on_config(
      self, config: DictConfig, callback: typing.Callable
  ):
      if (
          OmegaConf.is_list(config)
          and len(config) > 0
          and "url" in config[0]
      ):
          # Found the urls, let's test them
          for item in config:
              # flickr30 download source is down, ignore dataset until a
              # mirror can be found
              if (
                  getattr(item, "file_name", "")
                  == "flickr30_images.tar.gz"
              ):
                  continue
              # First try making the DownloadableFile class to make sure
              # everything is fine
              download = DownloadableFile(**item)
              # Now, call the actual callback which will test specific scenarios
              callback(download)
  
      elif OmegaConf.is_dict(config):
          # Both version and resources should be present
          if "version" in config:
              self.assertIn("resources", config)
          if "resources" in config:
              self.assertIn("version", config)
  
          # Let's continue recursing
          for item in config:
              self._recurse_on_config(config[item], callback=callback)
  
file_path: mmf/tests/configs/test_zoo_urls.py
imports: import re
  import time
  import typing
  import unittest
  from mmf.utils.configuration import load_yaml
  from mmf.utils.download import check_header, DownloadableFile
  from omegaconf import DictConfig, OmegaConf
  from tests.test_utils import skip_if_macos, skip_if_no_network
label_desc: Use image node_id 1 for calling the TestConfigsForKeys obj's underlying member method code with example usage: obj._recurse_on_config(config, callback) without return types