code: def select_data_from_date_filters(
      df: pd.DataFrame,
      feature_id: list,
      id_date: list,
      val_feature: list,
      start_date: list,
      end_date: list,
  ) -> pd.DataFrame:
      """Create a subset dataframe from filters.
  
      Parameters
      ----------
      round_dataframe : pd.DataFrame
          Data to sample
      id_feature : list
          features ids
      id_date : list
          date features ids
      val_feature : list
          features names
      start_date : list
          start dates selected
      end_date : list
          end dates selected
  
      Returns
      -------
      pd.DataFrame
          Subset dataframe
      """
      # get list of ID
      date_id = [id_date[i]["index"] for i in range(len(id_date))]
      # If there is some filters
      if len(date_id) > 0:
          for i in range(len(feature_id)):
              if feature_id[i] in date_id:
                  position = np.where(
                      np.array(date_id) == feature_id[i]
                  )[0][0]
                  if (position is not None) & (
                      start_date[position] < end_date[position]
                  ):
                      df = df[
                          (
                              (
                                  df[val_feature[i]]
                                  >= start_date[position]
                              )
                              & (
                                  df[val_feature[i]]
                                  <= end_date[position]
                              )
                          )
                      ]
  
      return df
  
imports: from typing import Optional, Tuple
  import numpy
  import pandas
  import datetime
  from dash import dcc, html
  import dash_bootstrap_components
label_desc: Use image node_id 5 for calling a global function with example usage: select_data_from_date_filters(df, feature_id, id_date, val_feature, start_date, end_date) and returns: df