code: def get_conf_path(filename=None):
      
      # Define conf_dir
      if running_under_pytest() or SAFE_MODE:
          # Use clean config dir if running tests or the user requests it.
          conf_dir = get_clean_conf_dir()
      elif sys.platform.startswith('linux'):
          # This makes us follow the XDG standard to save our settings
          # on Linux, as it was requested on Issue 2629
          xdg_config_home = os.environ.get('XDG_CONFIG_HOME', '')
          if not xdg_config_home:
              xdg_config_home = osp.join(get_home_dir(), '.config')
          if not osp.isdir(xdg_config_home):
              os.makedirs(xdg_config_home)
          conf_dir = osp.join(xdg_config_home, SUBFOLDER)
      else:
          conf_dir = osp.join(get_home_dir(), SUBFOLDER)
  
      # Create conf_dir
      if not osp.isdir(conf_dir):
          if running_under_pytest() or SAFE_MODE:
              os.makedirs(conf_dir)
          else:
              os.mkdir(conf_dir)
      if filename is None:
          return conf_dir
      else:
          return osp.join(conf_dir, filename)
docs: Return absolute path to the config file with the specified filename.