code: def _generate_data(
      n_inliers,
      n_outliers,
      n_features,
      coef,
      offset,
      random_state,
      n_nan=0,
      n_inf=0,
  ):
      """Internal function to generate data samples.
  
      Parameters
      ----------
      n_inliers : int
          The number of inliers.
  
      n_outliers : int
          The number of outliers.
  
      n_features : int
          The number of features (dimensions).
  
      coef : float in range [0,1)+0.001
          The coefficient of data generation.
  
      offset : int
          Adjust the value range of Gaussian and Uniform.
  
      random_state : int, RandomState instance or None, optional (default=None)
          If int, random_state is the seed used by the random number generator;
          If RandomState instance, random_state is the random number generator;
          If None, the random number generator is the RandomState instance used
          by `np.random`.
  
      n_nan : int
          The number of values that are missing (np.NaN). Defaults to zero.
  
      n_inf : int
          The number of values that are infinite. (np.infty). Defaults to zero.
  
      Returns
      -------
      X : numpy array of shape (n_train, n_features)
          Data.
  
      y : numpy array of shape (n_train,)
          Ground truth.
      """
  
      inliers = (
          coef * random_state.randn(n_inliers, n_features) + offset
      )
      outliers = random_state.uniform(
          low=-1 * offset, high=offset, size=(n_outliers, n_features)
      )
      X = np.r_[inliers, outliers]
  
      y = np.r_[np.zeros((n_inliers,)), np.ones((n_outliers,))]
  
      if n_nan > 0:
          X = np.r_[X, np.full((n_nan, n_features), np.NaN)]
          y = np.r_[y, np.full((n_nan), np.NaN)]
  
      if n_inf > 0:
          X = np.r_[X, np.full((n_inf, n_features), np.infty)]
          y = np.r_[y, np.full((n_inf), np.infty)]
  
      return X, y
  
file_path: pyod/pyod/utils/data.py
imports: from __future__ import division
  from __future__ import print_function
  from warnings import warn
  import numpy
  from sklearn.datasets import make_blobs
  from sklearn.metrics import roc_auc_score
  from sklearn.model_selection import train_test_split
  from sklearn.utils import check_X_y
  from sklearn.utils import check_consistent_length
  from sklearn.utils import check_random_state
  from sklearn.utils import column_or_1d
  from .utility import check_parameter
  from .utility import precision_n_scores
label_desc: Use image node_id 1 for calling a global function with example usage: _generate_data(n_inliers, n_outliers, n_features, coef, offset, random_state, n_nan, n_inf) and returns: X,  y