code: def make_moons(
      n_samples=100, *, shuffle=True, noise=None, random_state=None
  ):
      """Make two interleaving half circles.
  
      A simple toy dataset to visualize clustering and classification
      algorithms. Read more in the :ref:`User Guide <sample_generators>`.
  
      Parameters
      ----------
      n_samples : int or tuple of shape (2,), dtype=int, default=100
          If int, the total number of points generated.
          If two-element tuple, number of points in each of two moons.
  
          .. versionchanged:: 0.23
             Added two-element tuple.
  
      shuffle : bool, default=True
          Whether to shuffle the samples.
  
      noise : float, default=None
          Standard deviation of Gaussian noise added to the data.
  
      random_state : int, RandomState instance or None, default=None
          Determines random number generation for dataset shuffling and noise.
          Pass an int for reproducible output across multiple function calls.
          See :term:`Glossary <random_state>`.
  
      Returns
      -------
      X : ndarray of shape (n_samples, 2)
          The generated samples.
  
      y : ndarray of shape (n_samples,)
          The integer labels (0 or 1) for class membership of each sample.
      """
  
      if isinstance(n_samples, numbers.Integral):
          n_samples_out = n_samples // 2
          n_samples_in = n_samples - n_samples_out
      else:
          try:
              n_samples_out, n_samples_in = n_samples
          except ValueError as e:
              raise ValueError(
                  "`n_samples` can be either an int or a two-element tuple."
              ) from e
  
      generator = check_random_state(random_state)
  
      outer_circ_x = np.cos(np.linspace(0, np.pi, n_samples_out))
      outer_circ_y = np.sin(np.linspace(0, np.pi, n_samples_out))
      inner_circ_x = 1 - np.cos(np.linspace(0, np.pi, n_samples_in))
      inner_circ_y = (
          1 - np.sin(np.linspace(0, np.pi, n_samples_in)) - 0.5
      )
  
      X = np.vstack(
          [
              np.append(outer_circ_x, inner_circ_x),
              np.append(outer_circ_y, inner_circ_y),
          ]
      ).T
      y = np.hstack(
          [
              np.zeros(n_samples_out, dtype=np.intp),
              np.ones(n_samples_in, dtype=np.intp),
          ]
      )
  
      if shuffle:
          X, y = util_shuffle(X, y, random_state=generator)
  
      if noise is not None:
          X += generator.normal(scale=noise, size=X.shape)
  
      return X, y
  
imports: import array
  import numbers
  import warnings
  from collections.abc import Iterable
  from numbers import Integral, Real
  import numpy
  import scipy.sparse
  from scipy import linalg
  from ..preprocessing import MultiLabelBinarizer
  from ..utils import check_array, check_random_state
  from ..utils import shuffle
  from ..utils._param_validation import Hidden, Interval, StrOptions, validate_params
  from ..utils.random import sample_without_replacement
label_desc: Use image node_id 7 for calling a global function with example usage: make_moons(n_samples) and returns: X,  y