<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(self, emin_mev, emax_mev, delta, ne_cc):
 """Set the energy distribution function to a power law. **Call signature** *emin_mev* The minimum energy of the distribution, in MeV *emax_mev* The maximum energy of the distribution, in MeV *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 (emin_mev >= 0):
            raise ValueError('must have emin_mev >= 0; got %r' % (emin_mev,))
        if not (emax_mev >= emin_mev):
            raise ValueError('must have emax_mev >= emin_mev; got %r, %r' % (emax_mev, emin_mev))
        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_PLW
        self.in_vals[IN_VAL_EMIN] = emin_mev
        self.in_vals[IN_VAL_EMAX] = emax_mev
        self.in_vals[IN_VAL_DELTA1] = delta
        self.in_vals[IN_VAL_NB] = ne_cc
        return self