def cell_trap_getter_generator(priv_attr):
    """ Generates a getter function for the cell_trap property.
    """

    def getter(self):
        if getattr(self, priv_attr) is None:
            data =\
                (
                    self.gfpffc_bulb_1 - self.gfpffc_bulb_bg
                )/self.gfpffc_bulb_bg
            setattr(self, priv_attr, data)
        return getattr(self, priv_attr)

    return getter