code: def _check_optimizer_and_scheduler_config(optimizer, scheduler):
      if scheduler is not None and optimizer is None:
          raise ValueError(
              "You must also pass an optimizer if you pass a scheduler to fit()"
          )
  
imports: import logging
  import warnings
  from abc import abstractmethod
  from functools import partial
  from pathlib import Path
  from small_text.classifiers.classification import Classifier
  from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
  from small_text.training.early_stopping import EarlyStopping, NoopEarlyStopping, EarlyStoppingOrCondition
  from small_text.training.metrics import Metric
  from small_text.training.model_selection import ModelSelection, NoopModelSelection
  from small_text.utils.classification import empty_result, prediction_result
label_desc: Use image node_id 1 for calling a global function with example usage: _check_optimizer_and_scheduler_config(optimizer, scheduler) without return types