code: def to_ufo_glyph_background(self, glyph, layer):
      
  
      if not layer.hasBackground:
          return
  
      background = layer.background
      ufo_layer = self.to_ufo_background_layer(glyph)
      new_glyph = ufo_layer.newGlyph(glyph.name)
  
      width = background.userData[BACKGROUND_WIDTH_KEY]
      if width is not None:
          new_glyph.width = width
  
      self.to_ufo_background_image(new_glyph, background)
      self.to_ufo_paths(new_glyph, background)
      self.to_ufo_components(new_glyph, background)
      self.to_ufo_glyph_anchors(new_glyph, background.anchors)
      self.to_ufo_guidelines(new_glyph, background)
docs: Set glyph background.