code: def pages_folder_config(name, pages_folder, use_pages):
      if not pages_folder:
          return None
      is_custom_folder = str(pages_folder) != "pages"
      pages_folder_path = os.path.join(
          flask.helpers.get_root_path(name), pages_folder
      )
      if (use_pages or is_custom_folder) and not os.path.isdir(
          pages_folder_path
      ):
          error_msg = f"""
          A folder called `{pages_folder}` does not exist. If a folder for pages is not
          required in your application, set `pages_folder=""`. For example:
          `app = Dash(__name__,  pages_folder="")`
          """
          raise exceptions.InvalidConfig(error_msg)
      return pages_folder_path
  
file_path: dash/dash/_configs.py
imports: import os
  import flask
  from .None import exceptions
  from ._utils import AttributeDict
label_desc: Use image node_id 4 for calling a global function with example usage: pages_folder_config(name, pages_folder, use_pages) and returns: pages_folder_path, None