code: def update_features_to_display(
      features: int, nb_columns: int, value: int
  ) -> Tuple[int, int, dict]:
      """Update features to display slider.
  
      Parameters
      ----------
      features : int
          Number of features to plot from the settings
      nb_columns : int
          Number of columns in the data
      value : int
          Number of columns to plot
  
      Returns
      -------
      Tuple[int, int, dict]
          Number of columns to plot, Number max of columns to plot, Marks in the slider
      """
      max_value = min(features, nb_columns)
      if max_value % 5 == 0:
          nb_marks = min(int(max_value // 5), 10)
      elif max_value % 4 == 0:
          nb_marks = min(int(max_value // 4), 10)
      elif max_value % 3 == 0:
          nb_marks = min(int(max_value // 3), 10)
      elif max_value % 7 == 0:
          nb_marks = min(int(max_value // 7), 10)
      else:
          nb_marks = 2
      marks = {
          f"{round(max_value * feat / nb_marks)}": f"{round(max_value * feat / nb_marks)}"
          for feat in range(1, nb_marks + 1)
      }
      marks["1"] = "1"
      if max_value < value:
          value = max_value
  
      return value, max_value, marks
  
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 13 for calling a global function with example usage: update_features_to_display(features, nb_columns, value) and returns: value,  max_value,  marks