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.
docstr: Predict by applying the model on the given input data.
  
  Parameters
  ----------
  X
      Input data. It follows the same format as in the ``fit`` method.
  
  output_names
      Names of required outputs (optional). You can specify any final or
      intermediate output by passing the name of its associated data
      placeholder. This is useful for debugging. If not specified, it will
      return the outputs specified at instantiation.
  
  Returns
  -------
  array-like or list of array-like
      The computed outputs.
docstr_tok: ["Predict","by","applying","the","model","on","the","given","input","data",".","Parameters","--","--","--","--","--","X","Input","data",".","It","follows","the","same","format","as","in","the","``","fit","``","method",".","output_names","Names","of","required","outputs","(","optional",")",".","You","can","specify","any","final","or","intermediate","output","by","passing","the","name","of","its","associated","data","placeholder",".","This","is","useful","for","debugging",".","If","not","specified",",","it","will","return","the","outputs","specified","at","instantiation",".","Returns","--","--","--","-","array-like","or","list","of","array-like","The","computed","outputs","."]
code: def predict(
      self,
      X: Union[ArrayLikes, DataDict],
      output_names: Optional[Union[str, List[str]]] = None,
  ) -> ArrayLikes:
      """Predict by applying the model on the given input data.
  
      Parameters
      ----------
      X
          Input data. It follows the same format as in the ``fit`` method.
  
      output_names
          Names of required outputs (optional). You can specify any final or
          intermediate output by passing the name of its associated data
          placeholder. This is useful for debugging. If not specified, it will
          return the outputs specified at instantiation.
  
      Returns
      -------
      array-like or list of array-like
          The computed outputs.
      """
      # Intermediate results are stored here
      results_cache = dict()  # type: Dict[DataPlaceholder, ArrayLike]
  
      # Normalize inputs
      X_norm = self._normalize_data(X, self._internal_inputs)
  
      # Get required outputs
      if output_names is None:
          outputs = self._internal_outputs
      else:
          output_names = listify(output_names)
          if len(set(output_names)) != len(output_names):
              raise ValueError("output_names must be unique.")
          outputs = [
              self.get_data_placeholder(output)
              for output in output_names
          ]
  
      # We allow unused inputs to allow debugging different outputs
      # without having to change the inputs accordingly.
      nodes = self._get_required_nodes(
          X_norm,
          [],
          outputs,
          allow_unused_inputs=True,
          follow_targets=False,
      )
  
      # Compute
      results_cache.update(X_norm)
  
      for node in nodes:
          Xs = [results_cache[i] for i in node.inputs]
          self._compute_node(node, Xs, results_cache)
  
      output_data = [results_cache[o] for o in outputs]
      if len(output_data) == 1:
          return output_data[0]
      else:
          return output_data
  
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 10 for calling the Model obj's underlying member method code with example usage: obj.predict(X, output_names) and returns: output_data, output_data