parameters: (self, uuid, ui_scale)
docstring: gets the icon  for a given uuid
docstring_summary: gets the icon  for a given uuid
docstring_tokens: gets the icon for a given uuid
function: def get_icon_surface(self, uuid, ui_scale):
          """ gets the icon  for a given uuid"""
          try:
              pixbuf = None
  
              paths = SpicePathSet(self.index_cache[uuid], spice_type=self.spice_type)
  
              if self.themes:
                  pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(paths.thumb_local_path, 100 * ui_scale, -1, True)
              else:
                  pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(paths.thumb_local_path, 24 * ui_scale, 24 * ui_scale, True)
  
              if pixbuf == None:
                  raise Exception
  
              surf = Gdk.cairo_surface_create_from_pixbuf(pixbuf, ui_scale, None)
              return Gtk.Image.new_from_surface (surf)
          except Exception as e:
              debug("There was an error processing one of the images. Try refreshing the cache.")
              return Gtk.Image.new_from_icon_name('image-missing', Gtk.IconSize.LARGE_TOOLBAR)
function_tokens: def get_icon_surface ( self , uuid , ui_scale ) : try : pixbuf = None paths = SpicePathSet ( self . index_cache [ uuid ] , spice_type = self . spice_type ) if self . themes : pixbuf = GdkPixbuf . Pixbuf . new_from_file_at_scale ( paths . thumb_local_path , 100 * ui_scale , - 1 , True ) else : pixbuf = GdkPixbuf . Pixbuf . new_from_file_at_scale ( paths . thumb_local_path , 24 * ui_scale , 24 * ui_scale , True ) if pixbuf == None : raise Exception surf = Gdk . cairo_surface_create_from_pixbuf ( pixbuf , ui_scale , None ) return Gtk . Image . new_from_surface ( surf ) except Exception as e : debug ( "There was an error processing one of the images. Try refreshing the cache." ) return Gtk . Image . new_from_icon_name ( 'image-missing' , Gtk . IconSize . LARGE_TOOLBAR )