docstr: Wrap the call methods of the Module object by looping over all the
  items within the module, wrapping the __call__ methods of all
  submodules using _fn_with_var_arg.
  
  Parameters
  ----------
  keychain_mappings
      The keychain mappings of the object
  key
      The keychain of the object obj, used for recursion.
  obj
      the object whose __call__ method is to be wrapped
  _visited
      Placeholder for tracking the visited nodes, do not set this parameter.
  
  Returns
  -------
  None
docstr_tok: ["Wrap","the","call","methods","of","the","Module","object","by","looping","over","all","the","items","within","the","module",",","wrapping","the","__call__","methods","of","all","submodules","using","_fn_with_var_arg",".","Parameters","--","--","--","--","--","keychain_mappings","The","keychain","mappings","of","the","object","key","The","keychain","of","the","object","obj",",","used","for","recursion",".","obj","the","object","whose","__call__","method","is","to","be","wrapped","_visited","Placeholder","for","tracking","the","visited","nodes",",","do","not","set","this","parameter",".","Returns","--","--","--","-","None"]
code: def _wrap_call_methods(
      self, keychain_mappings, /, *, key="", obj=None, _visited=None
  ):
      """Wrap the call methods of the Module object by looping over all the
      items within the module, wrapping the __call__ methods of all
      submodules using _fn_with_var_arg.
  
      Parameters
      ----------
      keychain_mappings
          The keychain mappings of the object
      key
          The keychain of the object obj, used for recursion.
      obj
          the object whose __call__ method is to be wrapped
      _visited
          Placeholder for tracking the visited nodes, do not set this parameter.
  
      Returns
      -------
      None
      """
      _visited = ivy.default(_visited, {})
      if id(obj) in _visited or not isinstance(key, str):
          return
      _visited[id(obj)] = True
      if isinstance(obj, ModuleHelpers) and obj is not self:
          orig_key_chain = key[1:] if key[0] == "_" else key
  
          obj.__call__ = self._fn_with_var_arg(
              obj.__call__,
              self._extract_v,
              keychain_mappings,
              orig_key_chain,
          )
          return
      elif isinstance(obj, (list, tuple)):
          for i, val in enumerate(obj):
              self._wrap_call_methods(
                  keychain_mappings,
                  key=f"{key}/v{str(i)}",
                  obj=val,
                  _visited=_visited,
              )
          return
      elif isinstance(obj, dict):
          for k, val in obj.items():
              k = (
                  f"{key}/{k}"
                  if key != "" and isinstance(k, str)
                  else k
              )
              self._wrap_call_methods(
                  keychain_mappings, key=k, obj=val, _visited=_visited
              )
          return
      if not hasattr(obj, "__dict__"):
          return
      for k, val in obj.__dict__.items():
          if k[0:2] == "__":
              continue
          k = f"{key}/{k}" if key != "" else k
          if val is not None:
              self._wrap_call_methods(
                  keychain_mappings, key=k, obj=val, _visited=_visited
              )
      return
  
file_path: ivy/ivy/stateful/helpers.py
imports: import functools
  import logging
  import ivy
  from ivy.data_classes.container import Container
  from ivy.func_wrapper import _get_first_array
label_desc: Use image node_id 6 for calling the ModuleHelpers obj's underlying member method code with example usage: obj._wrap_call_methods() without return types