class_docstr: Registers function or classes as a dict.
class_docstr_tok: ["Registers","function","or","classes","as","a","dict","."]
docstr: Decorator method for registering functions/classes
  The info variable can be filled up using the register_with_info
  decorator instead of this one.
docstr_tok: ["Decorator","method","for","registering","functions\/classes","The","info","variable","can","be","filled","up","using","the","register_with_info","decorator","instead","of","this","one","."]
code: def register(
      self,
      obj: X,
      info: tp.Optional[tp.Dict[tp.Hashable, tp.Any]] = None,
  ) -> X:
      """Decorator method for registering functions/classes
      The info variable can be filled up using the register_with_info
      decorator instead of this one.
      """
      name = getattr(obj, "__name__", obj.__class__.__name__)
      self.register_name(name, obj, info)
      return obj
  
file_path: nevergrad/nevergrad/common/decorators.py
imports: import typing
  import functools
label_desc: Use image node_id 2 for calling the Registry obj's underlying member method code with example usage: obj.register(obj, info) and returns: obj