code: def nested_any(
      nest: Iterable,
      fn: Callable,
      check_nests: bool = False,
      _base: bool = True,
  ) -> bool:
      """Check the leaf nodes of nest x via function fn, and returns True if any
      evaluate to True, else False.
  
      Parameters
      ----------
      nest
          The nest to check the leaves of.
      fn
          The condition function, returning True or False.
      check_nests
          Whether to also check the nests for the condition, not only nest leaves.
          Default is ``False``.
      _base
          Whether the current function call is the first function call in the recursive
          stack. Used internally, do not set manually.
  
      Returns
      -------
      ret
          A boolean, whether the function evaluates to true for any leaf node.
      """
      if isinstance(nest, (tuple, list)):
          for item in nest:
              if nested_any(item, fn, check_nests, False):
                  return True
          if check_nests and fn(nest):
              return True
      elif isinstance(nest, dict):
          for v in nest.values():
              if nested_any(v, fn, check_nests, False):
                  return True
          if check_nests and fn(nest):
              return True
      elif fn(nest):
          return True
      return False
  
imports: from builtins import map
  from typing import Callable, Any, Union, List, Tuple, Optional, Dict, Iterable, Sequence
  from collections import UserDict, OrderedDict
  import ivy
  from ivy.utils.exceptions import handle_exceptions
label_desc: Use image node_id 15 for calling a global function with example usage: nested_any(nest, fn, check_nests, _base) and returns: False, True, True, True, True, True