code: def create_filter_modalities_selection(
      value: str, id: dict, round_dataframe: pd.DataFrame
  ) -> html.Div:
      """Create the modalities filter according to the feature type.
  
      Parameters
      ----------
      value : str
          feature name
      id : dict
          id of the filter
      round_dataframe : pd.DataFrame
          Dataframe
  
      Returns
      -------
      html.Div
          Div containing the modalities selection options
      """
      if type(round_dataframe[value].iloc[0]) == bool:
          new_element = html.Div(
              dcc.RadioItems(
                  [
                      {"label": val, "value": val}
                      for val in round_dataframe[value].unique()
                  ],
                  id={"type": "dynamic-bool", "index": id["index"]},
                  value=round_dataframe[value].iloc[0],
                  inline=False,
              ),
              style={"width": "65%", "margin-left": "20px"},
          )
      elif (type(round_dataframe[value].iloc[0]) == str) | (
          (type(round_dataframe[value].iloc[0]) == np.int64)
          & (len(round_dataframe[value].unique()) <= 20)
      ):
          new_element = html.Div(
              dcc.Dropdown(
                  id={"type": "dynamic-str", "index": id["index"]},
                  options=[
                      {"label": i, "value": i}
                      for i in np.sort(round_dataframe[value].unique())
                  ],
                  multi=True,
              ),
              style={"width": "65%", "margin-left": "20px"},
          )
      elif (type(round_dataframe[value].iloc[0]) is pd.Timestamp) | (
          type(round_dataframe[value].iloc[0]) is datetime.datetime
      ):
          new_element = (
              html.Div(
                  dcc.DatePickerRange(
                      id={"type": "dynamic-date", "index": id["index"]},
                      min_date_allowed=round_dataframe[value].min(),
                      max_date_allowed=round_dataframe[value].max(),
                      start_date=round_dataframe[value].min(),
                      end_date=round_dataframe[value].max(),
                  ),
                  style={"width": "65%", "margin-left": "20px"},
              ),
          )
      else:
          lower_value = 0
          upper_value = 0
          new_element = html.Div(
              [
                  dcc.Input(
                      id={"type": "lower", "index": id["index"]},
                      value=lower_value,
                      type="number",
                      style={"width": "60px"},
                  ),
                  " <= {} in [{}, {}]<= ".format(
                      value,
                      round_dataframe[value].min(),
                      round_dataframe[value].max(),
                  ),
                  dcc.Input(
                      id={"type": "upper", "index": id["index"]},
                      value=upper_value,
                      type="number",
                      style={"width": "60px"},
                  ),
              ],
              style={"margin-left": "20px"},
          )
  
      return new_element
  
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 20 for calling a global function with example usage: create_filter_modalities_selection(value, id, round_dataframe) and returns: new_element