code: def check_information_criterion(
      information_criterion, out_of_sample_size
  ):
      """Check whether the information criterion is valid"""
      if information_criterion not in VALID_CRITERIA:
          raise ValueError(
              "auto_arima not defined for information_criteria=%s. "
              "Valid information criteria include: %r"
              % (information_criterion, VALID_CRITERIA)
          )
  
      # check on information criterion and out_of_sample size
      if information_criterion == "oob" and out_of_sample_size == 0:
          information_criterion = "aic"
          warnings.warn(
              "information_criterion cannot be 'oob' with "
              "out_of_sample_size = 0. "
              "Falling back to information criterion = aic."
          )
  
      return information_criterion
  
file_path: pmdarima/pmdarima/arima/_validation.py
imports: import numpy
  import warnings
  from sklearn import metrics
  from pmdarima.warnings import ModelFitWarning
label_desc: Use image node_id 2 for calling a global function with example usage: check_information_criterion(information_criterion, out_of_sample_size) and returns: information_criterion