code: def basic_indices(
      shape,
      __reserved=not_set,
      min_dims=0,
      max_dims=None,
      allow_newaxis=False,
      allow_ellipsis=True,
  ):
      # type: (Shape, Any, int, int, bool, bool) -> st.SearchStrategy[BasicIndex]
      """
      The ``basic_indices`` strategy generates `basic indexes
      <https://docs.scipy.org/doc/numpy/reference/arrays.indexing.html>`__  for
      arrays of the specified shape, which may include dimensions of size zero.
  
      It generates tuples containing some mix of integers, :obj:`python:slice` objects,
      ``...`` (Ellipsis), and :obj:`numpy:numpy.newaxis`; which when used to index a
      ``shape``-shaped array will produce either a scalar or a shared-memory view.
  
      * ``shape``: the array shape that will be indexed, as a tuple of integers >= 0.
        This must be at least two-dimensional for a tuple to be a valid basic index;
        for one-dimensional arrays use :func:`~hypothesis.strategies.slices` instead.
      * ``min_dims``: the minimum dimensionality of the resulting view from use of
        the generated index.  When ``min_dims == 0``, scalars and zero-dimensional
        arrays are both allowed.
      * ``max_dims``: the maximum dimensionality of the resulting view.
        If not specified, it defaults to ``max(len(shape), min_dims) + 2``.
      * ``allow_ellipsis``: whether ``...``` is allowed in the index.
      * ``allow_newaxis``: whether :obj:`numpy:numpy.newaxis` is allowed in the index.
  
      Note that the length of the generated tuple may be anywhere between zero
      and ``min_dims``.  It may not match the length of ``shape``, or even the
      dimensionality of the array view resulting from its use!
      """
      # Arguments to exclude scalars, zero-dim arrays, and dims of size zero were
      # all considered and rejected.  We want users to explicitly consider those
      # cases if they're dealing in general indexers, and while it's fiddly we can
      # back-compatibly add them later (hence using __reserved to sim kwonlyargs).
      check_type(tuple, shape, "shape")
      if __reserved is not not_set:
          raise InvalidArgument("Do not pass the __reserved argument.")
      check_type(bool, allow_ellipsis, "allow_ellipsis")
      check_type(bool, allow_newaxis, "allow_newaxis")
      check_type(integer_types, min_dims, "min_dims")
      if max_dims is None:
          max_dims = min(max(len(shape), min_dims) + 2, 32)
      else:
          check_type(integer_types, max_dims, "max_dims")
      order_check("dims", 0, min_dims, max_dims)
      check_argument(
          max_dims <= 32,
          "max_dims=%r, but numpy arrays have at most 32 dimensions"
          % (max_dims,),
      )
      check_argument(
          all(isinstance(x, integer_types) and x >= 0 for x in shape),
          "shape=%r, but all dimensions must be of integer size >= 0"
          % (shape,),
      )
      return BasicIndexStrategy(
          shape,
          min_dims=min_dims,
          max_dims=max_dims,
          allow_ellipsis=allow_ellipsis,
          allow_newaxis=allow_newaxis,
      )
  
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 26 for calling a global function with example usage: basic_indices(shape, __reserved, min_dims, max_dims, allow_newaxis, allow_ellipsis) and returns: BasicIndexStrategy