<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_constant(self, name):
 """ Retrieve a constant with specified name in this unit system. Parameters name : str The name of the constant, e.g., G. Returns ------- const : float The value of the constant represented in this unit system. Examples -------- 306.6013937879527 """

        try:
            c = getattr(const, name)
        except AttributeError:
            raise ValueError("Constant name '{}' doesn't exist in astropy.constants".format(name))

        return c.decompose(self._core_units).value