class_docstr: Experiment node to connect experiments to EVC tree.
  
  The node carries an experiment in attribute `item`. The node can be instantiated only using the
  name of the experiment. The experiment will be created lazily on access to `node.item`.
  
  Attributes
  ----------
  name: str
      Name of the experiment
  item: None or :class:`orion.core.worker.experiment.Experiment`
      None if the experiment is not initialized yet. When initializing lazily, it creates an
      `Experiment` in read only mode.
  
  .. seealso::
  
      :py:class:`orion.core.utils.tree.TreeNode` for tree-specific attributes and methods.
class_docstr_tok: ["Experiment","node","to","connect","experiments","to","EVC","tree",".","The","node","carries","an","experiment","in","attribute","`","item","`",".","The","node","can","be","instantiated","only","using","the","name","of","the","experiment",".","The","experiment","will","be","created","lazily","on","access","to","`","node.item","`",".","Attributes","--","--","--","--","--","name",":","str","Name","of","the","experiment","item",":","None","or",":","class",":","`","orion.core.worker.experiment.Experiment","`","None","if","the","experiment","is","not","initialized","yet",".","When","initializing","lazily",",","it","creates","an","`","Experiment","`","in","read","only","mode",".","..","seealso",":",":",":","py",":","class",":","`","orion.core.utils.tree.TreeNode","`","for","tree-specific","attributes","and","methods","."]
docstr: Get parent of the experiment, None if no parent
  
  .. note::
  
      The instantiation of an EVC tree is lazy, which means accessing the parent of a node
      may trigger a call to database to build this parent live.
docstr_tok: ["Get","parent","of","the","experiment",",","None","if","no","parent","..","note",":",":","The","instantiation","of","an","EVC","tree","is","lazy",",","which","means","accessing","the","parent","of","a","node","may","trigger","a","call","to","database","to","build","this","parent","live","."]
code: def parent(self):
      """Get parent of the experiment, None if no parent
  
      .. note::
  
          The instantiation of an EVC tree is lazy, which means accessing the parent of a node
          may trigger a call to database to build this parent live.
  
      """
      if self._parent is None and self._no_parent_lookup:
          self._no_parent_lookup = False
          query = {"_id": self.item.refers.get("parent_id")}
          selection = {"name": 1, "version": 1}
          experiments = self.storage.fetch_experiments(query, selection)
  
          if experiments:
              parent = experiments[0]
              exp_node = ExperimentNode(
                  name=parent["name"],
                  version=parent.get("version", 1),
                  storage=self.storage,
              )
              self.set_parent(exp_node)
      return self._parent
  
file_path: orion/src/orion/core/evc/experiment.py
imports: import functools
  import logging
  from orion.core.utils.tree import TreeNode
label_desc: Use image node_id 3 for calling the ExperimentNode obj's underlying member method code with example usage: obj.parent() and returns: self