code: def is_config_file(filename, extensions=['.yml', '.yaml', '.json']):
      
      extensions = [extensions] if isinstance(extensions, string_types) else extensions
      return any(filename.endswith(e) for e in extensions)
docs: Return True if file has a valid config file type.
  
      Parameters
      ----------
      filename : str
          filename to check (e.g. ``mysession.json``).
      extensions : str or list
          filetypes to check (e.g. ``['.yaml', '.json']``).
  
      Returns
      -------
      bool