def _feature_to_transform_feature(
    feature: LiteFeature,
    base_features: List[FeatureBase],
) -> FeatureBase:
    """
    Transform LiteFeature into FeatureBase object. Handles the Multi-output
    feature in correct way.

    Args:
        feature (LiteFeature)
        base_features (List[FeatureBase])

    Returns:
       FeatureBase
    """
    assert feature.primitive

    assert isinstance(
        feature.primitive,
        TransformPrimitive,
    ), "Only Transform Primitives"

    fb = TransformFeature(base_features, feature.primitive)
    if feature.is_multioutput():
        sorted_features = sorted(
            [f for f in feature.related_features] + [feature],
            key=lambda x: x.idx,
        )
        names = [x.name for x in sorted_features]

        fb = fb.rename(feature.non_indexed_name)
        fb.set_feature_names(names)
    else:
        fb = fb.rename(feature.name)

    return fb

    Transform LiteFeature into FeatureBase object. Handles the Multi-output
    feature in correct way.

    Args:
        feature (LiteFeature)
        base_features (List[FeatureBase])

    Returns:
       FeatureBase
    
featuretools/feature_discovery/convertors.py