code: def valid_tuple_axes(ndim, min_size=0, max_size=None):
      # type: (int, int, int) -> st.SearchStrategy[Shape]
      """Return a strategy for generating permissible tuple-values for the
      ``axis`` argument for a numpy sequential function (e.g.
      :func:`numpy:numpy.sum`), given an array of the specified
      dimensionality.
  
      All tuples will have an length >= min_size and <= max_size. The default
      value for max_size is ``ndim``.
  
      Examples from this strategy shrink towards an empty tuple, which render
      most sequential functions as no-ops.
  
      The following are some examples drawn from this strategy.
  
      .. code-block:: pycon
  
          >>> [valid_tuple_axes(3).example() for i in range(4)]
          [(-3, 1), (0, 1, -1), (0, 2), (0, -2, 2)]
  
      ``valid_tuple_axes`` can be joined with other strategies to generate
      any type of valid axis object, i.e. integers, tuples, and ``None``:
  
      .. code-block:: pycon
  
          any_axis_strategy = none() | integers(-ndim, ndim - 1) | valid_tuple_axes(ndim)
  
      """
      if max_size is None:
          max_size = ndim
  
      check_type(integer_types, ndim, "ndim")
      check_type(integer_types, min_size, "min_size")
      check_type(integer_types, max_size, "max_size")
      order_check("size", 0, min_size, max_size)
      check_valid_interval(max_size, ndim, "max_size", "ndim")
  
      # shrink axis values from negative to positive
      axes = st.integers(0, max(0, 2 * ndim - 1)).map(
          lambda x: x if x < ndim else x - 2 * ndim
      )
      return st.lists(
          axes, min_size, max_size, unique_by=lambda x: x % ndim
      ).map(tuple)
  
imports: from __future__ import absolute_import, division, print_function
  import math
  import re
  from collections import namedtuple
  import numpy
  import hypothesis.internal.conjecture.utils
  import hypothesis.strategies._internal.core
  from hypothesis import Verbosity, assume
  from hypothesis._settings import note_deprecation
  from hypothesis.errors import InvalidArgument
  from hypothesis.internal.compat import PY2, hrange, integer_types, quiet_raise, string_types
  from hypothesis.internal.coverage import check_function
  from hypothesis.internal.reflection import proxies, reserved_means_kwonly_star
  from hypothesis.internal.validation import check_type, check_valid_interval
  from hypothesis.reporting import current_verbosity
  from hypothesis.strategies._internal import SearchStrategy
  from hypothesis.utils.conventions import UniqueIdentifier, not_set
label_desc: Use image node_id 22 for calling a global function with example usage: valid_tuple_axes(ndim, min_size, max_size) and returns: st