# - Generated by tools/entrypoint_compiler.py: do not edit by hand
"""
Transforms.TwoHeterogeneousModelCombiner
"""


from ..utils.entrypoints import EntryPoint
from ..utils.utils import try_set, unlist


def transforms_twoheterogeneousmodelcombiner(
        transform_model,
        predictor_model,
        model=None,
        **params):
    """
    **Description**
        Combines a TransformModel and a PredictorModel into a single
        PredictorModel.

    :param transform_model: Transform model (inputs).
    :param predictor_model: Predictor model (inputs).
    :param predictor_model: Predictor model (outputs).
    """

    entrypoint_name = 'Transforms.TwoHeterogeneousModelCombiner'
    inputs = {}
    outputs = {}

    if transform_model is not None:
        inputs['TransformModel'] = try_set(
            obj=transform_model,
            none_acceptable=False,
            is_of_type=str)
    if predictor_model is not None:
        inputs['PredictorModel'] = try_set(
            obj=predictor_model,
            none_acceptable=False,
            is_of_type=str)
    if model is not None:
        outputs['PredictorModel'] = try_set(
            obj=model, none_acceptable=False, is_of_type=str)

    input_variables = {
        x for x in unlist(inputs.values())
        if isinstance(x, str) and x.startswith("$")}
    output_variables = {
        x for x in unlist(outputs.values())
        if isinstance(x, str) and x.startswith("$")}

    entrypoint = EntryPoint(
        name=entrypoint_name, inputs=inputs, outputs=outputs,
        input_variables=input_variables,
        output_variables=output_variables)
    return entrypoint
