class_docstr: In-memory container for the trials that the algorithm suggests/observes/etc.
  
  This behaves a bit like a managed dictionary, but the "keys" are trials ids, which
  (at the time of writing) can vary depending on how we chose to compute them.
class_docstr_tok: ["In-memory","container","for","the","trials","that","the","algorithm","suggests\/observes\/etc",".","This","behaves","a","bit","like","a","managed","dictionary",",","but","the","``","keys","''","are","trials","ids",",","which","(","at","the","time","of","writing",")","can","vary","depending","on","how","we","chose","to","compute","them","."]
docstr: Register the given trial in the registry.
docstr_tok: ["Register","the","given","trial","in","the","registry","."]
code: def register(self, trial: Trial) -> str:
      """Register the given trial in the registry."""
      trial_id = _get_id(trial)
      if trial_id in self:
          existing = self._trials[trial_id]
          if existing.status != "new" and trial.status == "new":
              raise RuntimeError(
                  f"Can't overwrite existing (older) trial {existing} with new trial {trial}!"
              )
          logger.debug(
              "Overwriting existing trial %s with %s", existing, trial
          )
      else:
          logger.debug(
              "Registry %s Registering new trial %s (%s trials in total)",
              id(self),
              trial,
              len(self),
          )
      trial_copy = copy.deepcopy(trial)
      self._trials[trial_id] = trial_copy
      return trial_id
  
imports: from __future__ import annotations
  import copy
  from collections import defaultdict
  from logging import getLogger
  from typing import Any, Container, Iterable, Iterator, Mapping
  from orion.core.worker.trial import Trial, TrialCM
label_desc: Use image node_id 11 for calling the Registry obj's underlying member method code with example usage: obj.register(trial) and returns: trial_id