code: def get_resource_dirs(resource):
      
      dirs = [
          os.path.join(dir, resource) for dir in
          itertools.chain(GLib.get_system_data_dirs(), GUAKE_THEME_DIR, GLib.get_user_data_dir())
      ]
      dirs += [os.path.join(os.path.expanduser("~"), ".{}".format(resource))]
  
      return [Path(dir) for dir in dirs if os.path.isdir(dir)]
docs: Returns a list of all known resource dirs for a given resource.
  
      :param str resource:
          Name of the resource (e.g. "themes")
      :return:
          A list of resource dirs