<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_edist_powerlaw_gamma(self, gmin, gmax, delta, ne_cc):
 """Set the energy distribution function to a power law in the Lorentz factor **Call signature** *gmin* The minimum Lorentz factor of the distribution *gmax* The maximum Lorentz factor of the distribution *delta* The power-law index of the distribution *ne_cc* The number density of energetic electrons, in cm^-3. Returns *self* for convenience in chaining. """

        if not (gmin >= 1):
            raise ValueError('must have gmin >= 1; got %r' % (gmin,))
        if not (gmax >= gmin):
            raise ValueError('must have gmax >= gmin; got %r, %r' % (gmax, gmin))
        if not (delta >= 0):
            raise ValueError('must have delta >= 0; got %r, %r' % (delta,))
        if not (ne_cc >= 0):
            raise ValueError('must have ne_cc >= 0; got %r, %r' % (ne_cc,))

        self.in_vals[IN_VAL_EDIST] = EDIST_PLG
        self.in_vals[IN_VAL_EMIN] = (gmin - 1) * E0_MEV
        self.in_vals[IN_VAL_EMAX] = (gmax - 1) * E0_MEV
        self.in_vals[IN_VAL_DELTA1] = delta
        self.in_vals[IN_VAL_NB] = ne_cc
        return self