docstr: Yield URL(s) associated with a key, and keep stats on protocols.
docstr_tok: ["Yield","URL","(","s",")","associated","with","a","key",",","and","keep","stats","on","protocols","."]
code: def gen_URLS(self, key):
      """Yield URL(s) associated with a key, and keep stats on protocols."""
      nurls = 0
      for scheme, _ in self._scheme_hits.most_common():
          scheme_ = scheme + ":"
          scheme_urls = self.annex.geturls(key, scheme_)
          if scheme_urls:
              # note: generator would cease to exist thus not asking
              # for URLs for other schemes if this scheme is good enough
              self._scheme_hits[scheme] += 1
              for url in scheme_urls:
                  nurls += 1
                  yield url
      self.annex.debug("Processed %d URL(s) for key %s", nurls, key)
  
file_path: datalad/datalad/customremotes/base.py
imports: from __future__ import absolute_import
  import logging
  from collections import Counter
  from annexremote import RemoteError, UnsupportedRequest
  from datalad.customremotes import SpecialRemote
label_desc: Use image node_id 3 for calling the AnnexCustomRemote obj's underlying member method code with example usage: obj.gen_URLS(key) without return types