code: def _generate_hypercube(samples, dimensions, rng):
      """Returns distinct binary samples of length dimensions"""
      if dimensions > 30:
          return np.hstack(
              [
                  _generate_hypercube(samples, dimensions - 30, rng),
                  _generate_hypercube(samples, 30, rng),
              ]
          )
      out = astype(
          sample_without_replacement(
              2**dimensions, samples, random_state=rng
          ),
          dtype=">u4",
          copy=False,
      )
      out = np.unpackbits(out.view(">u1")).reshape((-1, 32))[
          :, -dimensions:
      ]
      return out
  
imports: import numbers
  import array
  import numpy
  from scipy import linalg
  import scipy.sparse
  from ..preprocessing import MultiLabelBinarizer
  from ..utils import check_array, check_random_state
  from ..utils import shuffle
  from ..utils.fixes import astype
  from ..utils.random import sample_without_replacement
  from ..externals import six
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_hypercube(samples, dimensions, rng) and returns: out, np