class_docstr: A Cell serves a Direct Acyclic Graph (DAG) which holds blocks as nodes and edges that
  connects operation paths between the nodes.
class_docstr_tok: ["A","Cell","serves","a","Direct","Acyclic","Graph","(","DAG",")","which","holds","blocks","as","nodes","and","edges","that","connects","operation","paths","between","the","nodes","."]
docstr: Initialization method.
  
  Args:
      type: Type of the block.
      pointer: Any type of callable to be applied when block is called.
docstr_tok: ["Initialization","method",".","Args",":","type",":","Type","of","the","block",".","pointer",":","Any","type","of","callable","to","be","applied","when","block","is","called","."]
code: def __init__(self, blocks: Block, edges: Tuple[Block, Block]) -> None:
      """Initialization method.
  
      Args:
          type: Type of the block.
          pointer: Any type of callable to be applied when block is called.
  
      """
  
      super().__init__()
  
      for i, block in enumerate(blocks):
          self.add_node(i, block=block)
  
      for u, v in edges:
          if u in self.nodes and v in self.nodes:
              if (
                  self.nodes[u]["block"].n_output
                  == self.nodes[v]["block"].n_input
              ):
                  self.add_edge(u, v)
  
file_path: opytimizer/opytimizer/core/cell.py
imports: import copy
  from typing import Generator, Tuple
  import networkx
  from networkx import DiGraph
  from opytimizer.core import InnerBlock, InputBlock, OutputBlock
  from opytimizer.core.block import Block
label_desc: Use image node_id 1 to create a new Cell object from inherited base classes: DiGraph with example: obj = Cell(blocks, edges)