class_docstr: Implementation of imbalanced bin class transformation for
  classification task by using method from sklearn.utils.resample
  
  Args:
      params: OperationParameters with the hyperparameters:
          balance: Data transformation strategy. Balance strategy can be 'expand_minority' or 'reduce_majority'.
              In case of expand_minority elements of minor class are expanding to n_samples.
              In otherwise with reduce_majority elements of major class are reducing to n_samples.
          replace: Implements resampling with replacement. If False, this will implement (sliced) random permutations.
          balance_ratio: Transformation ratio can take values in the range [0, 1].
              With balance_ratio = 0 nothing happens and data will remain the same.
              In case of balance_ratio = 1 means that both classes will be balanced and the shape of both will become
              equal. If balance_ratio < 1.0 means that the data of one class is getting closer to the shape of opposite
              class. If None numbers of samples will be equal to the shape of opposite selected transformed class.
class_docstr_tok: ["Implementation","of","imbalanced","bin","class","transformation","for","classification","task","by","using","method","from","sklearn.utils.resample","Args",":","params",":","OperationParameters","with","the","hyperparameters",":","balance",":","Data","transformation","strategy",".","Balance","strategy","can","be","'expand_minority","'","or","'reduce_majority","'",".","In","case","of","expand_minority","elements","of","minor","class","are","expanding","to","n_samples",".","In","otherwise","with","reduce_majority","elements","of","major","class","are","reducing","to","n_samples",".","replace",":","Implements","resampling","with","replacement",".","If","False",",","this","will","implement","(","sliced",")","random","permutations",".","balance_ratio",":","Transformation","ratio","can","take","values","in","the","range","[","0",",","1","]",".","With","balance_ratio","=","0","nothing","happens","and","data","will","remain","the","same",".","In","case","of","balance_ratio","=","1","means","that","both","classes","will","be","balanced","and","the","shape","of","both","will","become","equal",".","If","balance_ratio","<","1.0","means","that","the","data","of","one","class","is","getting","closer","to","the","shape","of","opposite","class",".","If","None","numbers","of","samples","will","be","equal","to","the","shape","of","opposite","selected","transformed","class","."]
docstr: Method checks if selected replace parameter is correct
  
  Args:
      min_data: minority data from input data
      maj_data: majority data from input data
docstr_tok: ["Method","checks","if","selected","replace","parameter","is","correct","Args",":","min_data",":","minority","data","from","input","data","maj_data",":","majority","data","from","input","data"]
code: def _check_and_correct_replace_param(
      self, min_data: np.array, maj_data: np.array
  ):
      """Method checks if selected replace parameter is correct
  
      Args:
          min_data: minority data from input data
          maj_data: majority data from input data
      """
      if self.replace is False:
          if (
              self.balance == "expand_minority"
              and self.n_samples >= min_data.shape[0]
          ):
              self.params.update(replace=True)
          elif (
              self.balance == "reduce_majority"
              and self.n_samples >= maj_data.shape[0]
          ):
              self.params.update(replace=True)
          self.log.debug(
              f"{GLOBAL_PREFIX} resample operation allow repeats in data"
          )
  
imports: from copy import copy
  from typing import Optional
  import numpy
  from golem.core.log import default_log
  from sklearn.utils import resample
  from fedot.core.data.data import InputData, OutputData
  from fedot.core.operations.evaluation.operation_implementations.implementation_interfaces import DataOperationImplementation
  from fedot.core.operations.operation_parameters import OperationParameters
label_desc: Use image node_id 9 for calling the ResampleImplementation obj's underlying member method code with example usage: obj._check_and_correct_replace_param(min_data, maj_data) without return types