code: def select_data_from_numeric_filters(
      df: pd.DataFrame,
      feature_id: list,
      id_lower_modality: list,
      val_feature: list,
      val_lower_modality: list,
      val_upper_modality: list,
  ) -> pd.DataFrame:
      """Create a subset dataframe from filters.
  
      Parameters
      ----------
      df : pd.DataFrame
          Data to sample
      feature_id : list
          features ids
      id_lower_modality : list
          numeric features ids
      val_feature : list
          features names
      val_lower_modality : list
          lower values of numeric filter
      val_upper_modality : list
          upper values of numeric filter
  
      Returns
      -------
      pd.DataFrame
          Subset dataframe
      """
      # get list of ID
      lower_id = [
          id_lower_modality[i]["index"]
          for i in range(len(id_lower_modality))
      ]
      # If there is some filters
      if len(lower_id) > 0:
          for i in range(len(feature_id)):
              if feature_id[i] in lower_id:
                  position = np.where(
                      np.array(lower_id) == feature_id[i]
                  )[0][0]
                  if (
                      (position is not None)
                      & (val_lower_modality[position] is not None)
                      & (val_upper_modality[position] is not None)
                  ):
                      if (
                          val_lower_modality[position]
                          < val_upper_modality[position]
                      ):
                          df = df[
                              (
                                  df[val_feature[i]]
                                  >= val_lower_modality[position]
                              )
                              & (
                                  df[val_feature[i]]
                                  <= val_upper_modality[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 4 for calling a global function with example usage: select_data_from_numeric_filters(df, feature_id, id_lower_modality, val_feature, val_lower_modality, val_upper_modality) and returns: df