class_docstr: Class providing the core functionality of a parameter, aka
  value, internal/model parameters, mutation, recombination
  and additional features such as shared random state,
  constraint check, hashes, generation and naming.
  The value field should sent to the function to optimize.
  
  Example
  -------
  >>> ng.p.Array(shape=(2,)).value
  array([0., 0.])
docstr: Sets the parenthood information to Parameter and subparameters.
docstr_tok: ["Sets","the","parenthood","information","to","Parameter","and","subparameters","."]
code: def _set_parenthood(self, parent: tp.Optional["Parameter"]) -> None:
      """Sets the parenthood information to Parameter and subparameters."""
      if parent is None:
          self._generation = 0
          self.heritage = dict(lineage=self.uid)
          self.parents_uids = []
      else:
          self._generation = parent.generation + 1
          self.parents_uids = [parent.uid]
      self._subobjects.apply("_set_parenthood", parent)
  
imports: import uuid
  import warnings
  import numpy
  import nevergrad.common.typing
  from nevergrad.common import errors
  from .None import utils
  from ._layering import ValueProperty
  from ._layering import Layered
  from ._layering import Level
label_desc: Use image node_id 26 for calling the Parameter obj's underlying member method code with example usage: obj._set_parenthood(parent) without return types