def METHOD_NAME(self, layer):
    ufo_font = self._sources[layer.associatedMasterId or layer.layerId].font
    if layer.associatedMasterId == layer.layerId:
        layer_name = "public.background"
    else:
        layer_name = layer.name + ".background"
    if layer_name not in ufo_font.layers:
        background_layer = ufo_font.newLayer(layer_name)
    else:
        background_layer = ufo_font.layers[layer_name]
    return background_layer