class_docstr: Printer to register as callback in an optimizer, for printing
  best point regularly.
  
  Parameters
  ----------
  print_interval_tells: int
      max number of evaluation before performing another print
  print_interval_seconds: float
      max number of seconds before performing another print
class_docstr_tok: ["Printer","to","register","as","callback","in","an","optimizer",",","for","printing","best","point","regularly",".","Parameters","--","--","--","--","--","print_interval_tells",":","int","max","number","of","evaluation","before","performing","another","print","print_interval_seconds",":","float","max","number","of","seconds","before","performing","another","print"]
code: def __call__(
      self, optimizer: base.Optimizer, *args: tp.Any, **kwargs: tp.Any
  ) -> None:
      if (
          time.time() >= self._next_time
          or self._next_tell >= optimizer.num_tell
      ):
          self._next_time = time.time() + self._print_interval_seconds
          self._next_tell = (
              optimizer.num_tell + self._print_interval_tells
          )
          x = optimizer.provide_recommendation()
          print(f"After {optimizer.num_tell}, recommendation is {x}")
  
imports: import json
  import time
  import warnings
  import inspect
  import datetime
  import logging
  from pathlib import Path
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import errors
  from nevergrad.parametrization import parameter
  from nevergrad.parametrization import helpers
  from .None import base
label_desc: Use image node_id 2 for calling the OptimizationPrinter obj's underlying member method code with example usage: obj.__call__(optimizer) without return types