def _define_names(d_t, d_y, treatment_names, output_names, feature_names, input_names, featurizer):
    """
    Helper function to get treatment and output names

    Parameters
    ----------
    d_t: tuple of int
        Tuple of number of treatment (exclude control in discrete treatment scenario).
    d_y: tuple of int
        Tuple of number of outcome.
    treatment_names: None or list
        The name of treatment. In discrete treatment scenario, the name should not include the name of
        the baseline treatment (i.e. the control treatment, which by default is the alphabetically smaller)
    output_names:  None or list
        The name of the outcome.
    feature_names: None or list
        The user provided names of the features
    input_names: dicitionary
        The names of the features, outputs and treatments parsed from the fit input at fit time.
    featurizer: optional None or instance of featurizer
        Fitted Featurizer of feature X.

    Returns
    -------
    d_t: int
    d_y: int
    treament_names: List
    output_names: List
    feature_names: List
    transformed_feature_names: List or None
    """

    d_t = d_t[0] if d_t else 1
    d_y = d_y[0] if d_y else 1

    if treatment_names is None:
        treatment_names = input_names['treatment_names']
    if output_names is None:
        output_names = input_names['output_names']
    if feature_names is None:
        feature_names = input_names['feature_names']
    if featurizer is None:
        transformed_feature_names = feature_names
    elif featurizer is not None and hasattr(featurizer, 'get_feature_names'):
        transformed_feature_names = featurizer.get_feature_names(feature_names)
    else:
        transformed_feature_names = None

    return (d_t, d_y, treatment_names, output_names, feature_names, transformed_feature_names)