code: def get_feature_from_features_groups(
      selected_feature: Optional[str], features_groups: dict
  ) -> Optional[str]:
      """Get the group feature name of the selected feature.
  
      Parameters
      ----------
      selected_feature : Optional[str]
          Selected feature
      features_groups : dict
          Groups names and corresponding list of features
  
      Returns
      -------
      Optional[str]
          Group feature name or selected feature if not in a group.
      """
      list_sub_features = [
          f
          for group_features in features_groups.values()
          for f in group_features
      ]
      if selected_feature in list_sub_features:
          for k, v in features_groups.items():
              if selected_feature in v:
                  selected_feature = k
      return selected_feature
  
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 7 for calling a global function with example usage: get_feature_from_features_groups(selected_feature, features_groups) and returns: selected_feature