code: def from_pipeline(cls, m: DLInferencePipeline) -> "DDRPredictor":
      return cls(m.build_model.model)
  
imports: import os
  import numpy
  from typing import Any
  from typing import List
  from typing import Tuple
  from typing import Union
  from typing import Callable
  from typing import Optional
  from cftool.array import to_numpy
  from cftool.array import to_torch
  from cftool.types import tensor_dict_type
  from ...pipeline import DLInferencePipeline
  from ...constants import PREDICTIONS_KEY
  from ...misc.toolkit import get_device
  from ...misc.toolkit import eval_context
  from ...misc.toolkit import show_or_save
  from ...models.ml import DDR
  from ...models.ml.ddr import TCond
label_desc: Use image node_id 6 for calling the DDRPredictor obj's underlying member method code with example usage: obj.from_pipeline(cls, m) and returns: cls