class_docstr: Utility class to manage a set of ``ConfigItem`` and resolve the references between them.
  
  This class maintains a set of ``ConfigItem`` objects and their associated IDs.
  The IDs must be unique within this set. A string in ``ConfigItem``
  starting with ``@`` will be treated as a reference to other ``ConfigItem`` objects by ID.
  Since ``ConfigItem`` may have a nested dictionary or list structure,
  the reference string may also contain the separator ``::`` to refer to a substructure by
  key indexing for a dictionary or integer indexing for a list.
  
  In this class, resolving references is essentially substitution of the reference strings with the
  corresponding python objects. A typical workflow of resolving references is as follows:
  
      - Add multiple ``ConfigItem`` objects to the ``ReferenceResolver`` by ``add_item()``.
      - Call ``get_resolved_content()`` to automatically resolve the references. This is done (recursively) by:
          - Convert the items to objects, for those do not have references to other items.
              - If it is instantiable, instantiate it and cache the class instance in ``resolved_content``.
              - If it is an expression, evaluate it and save the value in ``resolved_content``.
          - Substitute the reference strings with the corresponding objects.
  
  Args:
      items: ``ConfigItem``s to resolve, this could be added later with ``add_item()``.
docstr: Recursively search all the content of input config item to get the ids of references.
  References mean: the IDs of other config items (``"@XXX"`` in this config item), or the
  sub-item in the config is `instantiable`, or the sub-item in the config is `expression`.
  For `dict` and `list`, recursively check the sub-items.
  
  Args:
      config: input config content to search.
      id: ID name for the input config item.
      refs: dict of the ID name and count of found references, default to `None`.
docstr_tok: ["Recursively","search","all","the","content","of","input","config","item","to","get","the","ids","of","references",".","References","mean",":","the","IDs","of","other","config","items","(","``","``","@","XXX","''","``","in","this","config","item",")",",","or","the","sub-item","in","the","config","is","`","instantiable","`",",","or","the","sub-item","in","the","config","is","`","expression","`",".","For","`","dict","`","and","`","list","`",",","recursively","check","the","sub-items",".","Args",":","config",":","input","config","content","to","search",".","id",":","ID","name","for","the","input","config","item",".","refs",":","dict","of","the","ID","name","and","count","of","found","references",",","default","to","`","None","`","."]
code: def find_refs_in_config(
      cls, config: Any, id: str, refs: dict[str, int] | None = None
  ) -> dict[str, int]:
      """
      Recursively search all the content of input config item to get the ids of references.
      References mean: the IDs of other config items (``"@XXX"`` in this config item), or the
      sub-item in the config is `instantiable`, or the sub-item in the config is `expression`.
      For `dict` and `list`, recursively check the sub-items.
  
      Args:
          config: input config content to search.
          id: ID name for the input config item.
          refs: dict of the ID name and count of found references, default to `None`.
  
      """
      refs_: dict[str, int] = refs or {}
      if isinstance(config, str):
          for id, count in cls.match_refs_pattern(
              value=config
          ).items():  # ref count is not currently used
              refs_[id] = refs_.get(id, 0) + count
      if not isinstance(config, (list, dict)):
          return refs_
      for _, sub_id, v in cls.iter_subconfigs(id, config):
          if (
              ConfigComponent.is_instantiable(v)
              or ConfigExpression.is_expression(v)
              and sub_id not in refs_
          ):
              refs_[sub_id] = 1
          refs_ = cls.find_refs_in_config(v, sub_id, refs_)
      return refs_
  
imports: from __future__ import annotations
  import re
  import warnings
  from collections.abc import Sequence
  from typing import Any, Iterator
  from monai.bundle.config_item import ConfigComponent, ConfigExpression, ConfigItem
  from monai.bundle.utils import ID_REF_KEY, ID_SEP_KEY
  from monai.utils import allow_missing_reference, look_up_option
label_desc: Use image node_id 13 for calling the ReferenceResolver obj's underlying member method code with example usage: obj.find_refs_in_config(cls, config, id, refs) and returns: refs_, refs_