code: def test_get_feature_names_out(df_time):
      # input features
      original_features = [
          "ambient_temp",
          "module_temp",
          "irradiation",
          "color",
      ]
  
      # When freq is a string:
      tr = LagFeatures(freq="1D")
      tr.fit(df_time)
  
      # Expected
      out = [
          "ambient_temp_lag_1D",
          "module_temp_lag_1D",
          "irradiation_lag_1D",
      ]
      out = original_features + out
      assert tr.get_feature_names_out(input_features=None) == out
      assert (
          tr.get_feature_names_out(input_features=original_features)
          == out
      )
      assert (
          tr.get_feature_names_out(input_features=df_time.columns)
          == out
      )
  
      with pytest.raises(ValueError):
          # assert error when user passes a string instead of list
          tr.get_feature_names_out(input_features=original_features[0])
  
      with pytest.raises(ValueError):
          # assert error when uses passes features that were not lagged
          tr.get_feature_names_out(input_features=["color"])
  
      # When period is an int:
      tr = LagFeatures(periods=2)
      tr.fit(df_time)
  
      # Expected
      out = [
          "ambient_temp_lag_2",
          "module_temp_lag_2",
          "irradiation_lag_2",
      ]
      out = original_features + out
      assert tr.get_feature_names_out(input_features=None) == out
      assert (
          tr.get_feature_names_out(input_features=original_features)
          == out
      )
      assert (
          tr.get_feature_names_out(input_features=df_time.columns)
          == out
      )
  
      # When freq is a list:
      tr = LagFeatures(freq=["3D", "2D"])
      tr.fit(df_time)
  
      # Expected
      out = [
          "ambient_temp_lag_3D",
          "module_temp_lag_3D",
          "irradiation_lag_3D",
          "ambient_temp_lag_2D",
          "module_temp_lag_2D",
          "irradiation_lag_2D",
      ]
      out = original_features + out
  
      assert tr.get_feature_names_out(input_features=None) == out
      assert (
          tr.get_feature_names_out(input_features=df_time.columns)
          == out
      )
  
      # When periods is a list:
      tr = LagFeatures(periods=[2, 3])
      tr.fit(df_time)
  
      # Expected
      out = [
          "ambient_temp_lag_2",
          "module_temp_lag_2",
          "irradiation_lag_2",
          "ambient_temp_lag_3",
          "module_temp_lag_3",
          "irradiation_lag_3",
      ]
      out = original_features + out
  
      assert tr.get_feature_names_out(input_features=None) == out
      assert (
          tr.get_feature_names_out(input_features=original_features)
          == out
      )
  
      # When drop original is true.
      tr = LagFeatures(freq="1D", drop_original=True)
      tr.fit(df_time)
  
      # Expected
      out = [
          "ambient_temp_lag_1D",
          "module_temp_lag_1D",
          "irradiation_lag_1D",
      ]
      assert (
          tr.get_feature_names_out(input_features=None)
          == ["color"] + out
      )
      assert (
          tr.get_feature_names_out(input_features=original_features)
          == ["color"] + out
      )
  
file_path: feature_engine/tests/test_time_series/test_forecasting/test_lag_features.py
imports: import numpy
  import pandas
  import pytest
  from feature_engine.timeseries.forecasting import LagFeatures
label_desc: Use image node_id 6 for calling a global function with example usage: test_get_feature_names_out(df_time) without return types