code: def file_extension_is_compatible(q):
      cfg = q.client["dataset/import/cfg"]
      allowed_extensions = cfg.dataset._allowed_file_extensions
  
      is_correct_extension = []
      for mode in ["train", "validation"]:
          dataset_name = q.client[
              f"dataset/import/cfg/{mode}_dataframe"
          ]
  
          if dataset_name is None or dataset_name == "None":
              continue
          is_correct_extension.append(
              dataset_name.endswith(allowed_extensions)
          )
      return all(is_correct_extension)
  
imports: import functools
  import hashlib
  import logging
  import os
  import re
  import shutil
  import time
  import traceback
  from typing import List, Optional
  import pandas
  from h2o_wave import Q, ui
  from h2o_wave.types import FormCard, ImageCard, MarkupCard, StatListItem, Tab
  from llm_studio.app_utils.config import default_cfg
  from llm_studio.app_utils.db import Dataset
  from llm_studio.app_utils.sections.common import clean_dashboard
  from llm_studio.app_utils.sections.experiment import experiment_start
  from llm_studio.app_utils.sections.histogram_card import histogram_card
  from llm_studio.app_utils.utils import add_model_type, azure_download, azure_file_options, check_valid_upload_content, clean_error, dir_file_table, get_data_dir, get_dataset_elements, get_datasets, get_experiments_status, get_frame_stats, get_model_types, get_problem_types, get_unique_dataset_name, kaggle_download, local_download, make_label, parse_ui_elements, remove_temp_files, s3_download, s3_file_options
  from llm_studio.app_utils.wave_utils import busy_dialog, ui_table_from_df
  from llm_studio.src.datasets.conversation_chain_handler import get_conversation_chains
  from llm_studio.src.utils.config_utils import load_config_py, load_config_yaml, save_config_yaml
  from llm_studio.src.utils.data_utils import get_fill_columns, read_dataframe, read_dataframe_drop_missing_labels, sanity_check
  from llm_studio.src.utils.plot_utils import PlotData
label_desc: Use image node_id 1 for calling a global function with example usage: file_extension_is_compatible(q) and returns: all