code: def _assert_singleobjective_callback(
      optimizer: obase.Optimizer, candidate: p.Parameter, loss: float
  ) -> None:
      if optimizer.num_tell <= 1 and not isinstance(
          loss, numbers.Number
      ):
          raise TypeError(
              f"Cannot process loss {loss} of type {type(loss)}.\n"
              "For multiobjective functions, did you forget to specify 'func.multiobjective_upper_bounds'?"
          )
  
imports: import sys
  import time
  import random
  import numbers
  import warnings
  import traceback
  import nevergrad.common.typing
  import typing
  import numpy
  from nevergrad.parametrization import parameter
  from nevergrad.common import decorators
  from nevergrad.common import errors
  from ..functions import base
  from ..optimization import base
  from ..optimization.optimizerlib import registry
  from .None import execution
label_desc: Use image node_id 1 for calling a global function with example usage: _assert_singleobjective_callback(optimizer, candidate, loss) without return types