class_docstr: A Node instance is used for composing tree-based structures.
class_docstr_tok: ["A","Node","instance","is","used","for","composing","tree-based","structures","."]
code: def parent(self, parent: Node) -> None:
      if parent and not isinstance(parent, Node):
          raise e.TypeError("`parent` should be a Node")
  
      self._parent = parent
  
imports: from __future__ import annotations
  from typing import Any, Dict, List, Optional, Union
  import numpy
  import opytimizer.utils.constant
  import opytimizer.utils.exception
label_desc: Use image node_id 15 for calling the Node obj's underlying member method code with example usage: obj.parent(parent) without return types