def METHOD_NAME(
    temp_model_path, known_covariates_names, past_covariates_names, static_features_names
):
    item_id_to_length = {1: 10, 5: 20, 2: 30}
    data = get_data_frame_with_variable_lengths(
        item_id_to_length, covariates_names=known_covariates_names + past_covariates_names
    )
    if static_features_names:
        columns = {k: np.random.normal(size=len(item_id_to_length)) for k in static_features_names}
        data.static_features = pd.DataFrame(columns, index=data.item_ids)
    feat_gen = TimeSeriesFeatureGenerator(target="target", known_covariates_names=known_covariates_names)
    data = feat_gen.fit_transform(data)
    # Initialize model._target_lag_indices and model._time_features from freq
    model = DirectTabularModel(path=temp_model_path, metadata=feat_gen.covariate_metadata)
    model.fit(train_data=data, time_limit=2)
    df = model._get_features_dataframe(data)
    expected_num_features = (
        len(model._time_features)
        + 1
        + len(model._target_lag_indices)
        + len(known_covariates_names) * len(model._known_covariates_lag_indices)
        + len(past_covariates_names) * len(model._past_covariates_lag_indices)
        + len(static_features_names)
    )
    assert len(df.columns) == expected_num_features
    assert all(col in df.columns for col in static_features_names)