code: def nested_dtypes(
      subtype_strategy: st.SearchStrategy[np.dtype] = scalar_dtypes(),
      *,
      max_leaves: int = 10,
      max_itemsize: Optional[int] = None,
  ) -> st.SearchStrategy[np.dtype]:
      """Return the most-general dtype strategy.
  
      Elements drawn from this strategy may be simple (from the
      subtype_strategy), or several such values drawn from
      :func:`array_dtypes` with ``allow_subarrays=True``. Subdtypes in an
      array dtype may be nested to any depth, subject to the max_leaves
      argument.
      """
      return st.recursive(
          subtype_strategy,
          lambda x: array_dtypes(x, allow_subarrays=True),
          max_leaves=max_leaves,
      ).filter(
          lambda d: max_itemsize is None or d.itemsize <= max_itemsize
      )
  
imports: import importlib
  import math
  from typing import TYPE_CHECKING, Any, Literal, Mapping, Optional, Sequence, Tuple, Type, TypeVar, Union
  import numpy
  from hypothesis import strategies
  from hypothesis._settings import note_deprecation
  from hypothesis.errors import HypothesisException, InvalidArgument
  from hypothesis.extra._array_helpers import NDIM_MAX, BasicIndex, BasicIndexStrategy, BroadcastableShapes, Shape, array_shapes, broadcastable_shapes, check_argument, check_valid_dims, mutually_broadcastable_shapes, order_check, valid_tuple_axes
  from hypothesis.internal.conjecture import utils
  from hypothesis.internal.coverage import check_function
  from hypothesis.internal.reflection import proxies
  from hypothesis.internal.validation import check_type
  from hypothesis.strategies._internal.numbers import Real
  from hypothesis.strategies._internal.strategies import Ex, T, check_strategy
  from hypothesis.strategies._internal.utils import defines_strategy
label_desc: Use image node_id 20 for calling a global function with example usage: nested_dtypes(subtype_strategy) and returns: st