code: def update_leaderboard(
      identifier: str,
      loss: float,
      array: np.ndarray,
      verbose: bool = True,
  ) -> None:
      """Handy function for storing best results for challenging functions (eg.: Photonics)
      The best results are kept in a file that is automatically updated with new data.
      This may require installing nevergrad in dev mode.
  
      Parameters
      ----------
      identifier: str
          the identifier of the problem
      loss: float
          the new loss, if better than the one in the file, the file will be updated
      array: np.ndarray
          the array corresponding to the loss
      verbose: bool
          whether to also print a message if the leaderboard was updated
      """
      # pylint: disable=import-outside-toplevel
      import pandas as pd  # lazzy to avoid requiring pandas for using an ExperimentFunction
  
      loss = np.round(
          loss, decimals=12
      )  # this is probably already too precise for the machine
      filepath = Path(__file__).with_name("leaderboard.csv")
      bests = pd.DataFrame(columns=["loss", "array"])
      if filepath.exists():
          bests = pd.read_csv(filepath, index_col=0)
      if identifier not in bests.index:
          bests.loc[identifier, :] = (float("inf"), "")
      try:
          if not bests.loc[identifier, "loss"] < loss:  # works for nan
              bests.loc[identifier, "loss"] = loss
              string = (
                  "[" + ",".join(str(x) for x in array.ravel()) + "]"
              )
              bests.loc[identifier, "array"] = string
              bests = bests.loc[sorted(x for x in bests.index), :]
              bests.to_csv(filepath)
              if verbose:
                  print(
                      f"New best value for {identifier}: {loss}\nwith: {string[:80]}"
                  )
      except Exception:  # pylint: disable=broad-except
          pass
  
imports: import inspect
  from pathlib import Path
  import numbers
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import errors
  from nevergrad.common.errors import UnsupportedExperiment
  from nevergrad.parametrization import parameter
  from nevergrad.optimization import multiobjective
label_desc: Use image node_id 2 for calling a global function with example usage: update_leaderboard(identifier, loss, array, verbose) without return types