code: def test_simple_features_logging_time_index(
      dummy_data, logging_file_path
  ):
      fd = FeatureDescriptor(
          function=np.sum,
          series_name="EDA",
          window="5s",
          stride="12s",
      )
      fc = FeatureCollection(feature_descriptors=fd)
      fc.add(
          MultipleFeatureDescriptors(
              np.min,
              series_names=["TMP", "ACC_x"],
              windows="5s",
              strides="12s",
          )
      )
      fc.add(
          FeatureDescriptor(
              np.min, series_name=("EDA",), window="5s", stride="12s"
          )
      )
  
      assert set(fc.get_required_series()) == set(
          ["EDA", "TMP", "ACC_x"]
      )
      assert len(fc.get_required_series()) == 3
  
      assert not os.path.exists(logging_file_path)
  
      # Sequential (n_jobs <= 1), otherwise file_path gets cleared
      _ = fc.calculate(
          dummy_data, logging_file_path=logging_file_path, n_jobs=1
      )
  
      assert os.path.exists(logging_file_path)
      logging_df = get_feature_logs(logging_file_path)
  
      assert all(
          logging_df.columns.values
          == [
              "log_time",
              "function",
              "series_names",
              "window",
              "stride",
              "output_names",
              "duration",
              "duration %",
          ]
      )
  
      assert len(logging_df) == 4
      assert logging_df.select_dtypes(
          include=[np.datetime64]
      ).columns.values == ["log_time"]
      assert logging_df.select_dtypes(
          include=[np.timedelta64]
      ).columns.values == ["duration"]
  
      assert np.isclose(logging_df["duration %"].sum(), 100, atol=0.5)
  
      assert set(logging_df["function"].values) == set(["amin", "sum"])
      assert set(logging_df["series_names"].values) == set(
          ["(EDA,)", "(ACC_x,)", "(TMP,)"]
      )
      assert set(logging_df["output_names"].values) == set(
          [
              "EDA__sum__w=5s",
              "EDA__amin__w=5s",
              "TMP__amin__w=5s",
              "ACC_x__amin__w=5s",
          ]
      )
      assert all(logging_df["window"] == "5s")
      assert all(logging_df["stride"] == ("12s",))
  
      function_stats_df = get_function_stats(logging_file_path)
      assert len(function_stats_df) == 2
      assert set(function_stats_df.index) == set(
          [(s, "5s", ("12s",)) for s in ["sum", "amin"]]
      )
      assert all(function_stats_df["duration"]["mean"] > 0)
      assert function_stats_df["duration"]["count"].sum() == 4
      assert np.isclose(
          function_stats_df["duration %"]["sum"].sum(), 100, atol=0.5
      )
      assert all(function_stats_df["duration %"]["mean"] > 0)
  
      series_names_df = get_series_names_stats(logging_file_path)
      assert len(series_names_df) == 3
      assert set(series_names_df.index) == set(
          [
              (s, "5s", ("12s",))
              for s in ["(EDA,)", "(TMP,)", "(ACC_x,)"]
          ]
      )
      assert all(series_names_df["duration"]["mean"] > 0)
      assert series_names_df["duration"]["count"].sum() == 4
      assert np.isclose(
          series_names_df["duration %"]["sum"].sum(), 100, atol=0.5
      )
      assert all(series_names_df["duration %"]["mean"] > 0)
  
file_path: tsflex/tests/test_features_logging.py
imports: import os
  import warnings
  import numpy
  from tsflex.features import FeatureCollection, FeatureDescriptor, MultipleFeatureDescriptors, get_feature_logs, get_function_stats, get_series_names_stats
  from tsflex.utils.data import flatten
  from .utils import dummy_data, logging_file_path
label_desc: Use image node_id 1 for calling a global function with example usage: test_simple_features_logging_time_index(dummy_data, logging_file_path) without return types