code: def _all_partitions(nx, ny):
      """
      Partition a set of indices into two fixed-length sets in all possible ways
  
      Partition a set of indices 0 ... nx + ny - 1 into two sets of length nx and
      ny in all possible ways (ignoring order of elements).
      """
      z = np.arange(nx + ny)
      for c in combinations(z, nx):
          x = np.array(c)
          mask = np.ones(nx + ny, bool)
          mask[x] = False
          y = z[mask]
          yield x, y
  
imports: from collections import namedtuple
  from dataclasses import make_dataclass
  import numpy
  import warnings
  from itertools import combinations
  import scipy.stats
  from scipy.optimize import shgo
  from .None import distributions
  from ._continuous_distns import chi2, norm
  from scipy.special import gamma, kv, gammaln
  from .None import _wilcoxon_data
label_desc: Use image node_id 15 for calling a global function with example usage: _all_partitions(nx, ny) without return types