class_docstr: A Model is a network (more precisely, a directed acyclic graph) of Steps,
  and it is defined from the input/output specification of the pipeline.
  Models have fit and predict routines that, together with graph-based engine,
  allow the automatic (feed-forward) computation of each of the pipeline steps
  when fed with data.
  
  Parameters
  ----------
  inputs
      Inputs to the model.
  
  outputs
      Outputs of the model.
  
  targets
      Targets of the model.
  
  name
      Name of the model (optional). If no name is passed, a name will be
      automatically generated.
code: def __init__(
      self,
      inputs: DataPlaceHolders,
      outputs: DataPlaceHolders,
      targets: Optional[DataPlaceHolders] = None,
      name: Optional[str] = None,
  ):
      super().__init__(name=name)
  
      def check(this: DataPlaceHolders, what: str) -> List:
          this = listify(this)
          if not is_data_placeholder_list(this):
              raise ValueError(
                  "{} must be of type DataPlaceholder.".format(what)
              )
          if len(set(this)) != len(this):
              raise ValueError("{} must be unique.".format(what))
          return this
  
      inputs = check(inputs, "inputs")
      outputs = check(outputs, "outputs")
      if targets is not None:
          targets = check(targets, "targets")
      else:
          targets = []
  
      self._n_outputs = len(outputs)
      self._internal_inputs = inputs
      self._internal_outputs = outputs
      self._internal_targets = targets
      self._build()
  
imports: from collections import defaultdict
  from typing import Union, List, Dict, Set, Iterable, Optional
  from baikal._core.data_placeholder import is_data_placeholder_list, DataPlaceholder
  from baikal._core.digraph import DiGraph
  from baikal._core.step import Step, InputStep, Node
  from baikal._core.typing import ArrayLike
  from baikal._core.utils import listify, safezip2, SimpleCache, unlistify
label_desc: Use image node_id 1 to create a new Model object from inherited base classes: Step with example: obj = Model(inputs, outputs, targets, name)