<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def vi_score(self, x, index):
 """ Wrapper function for selecting appropriate score Parameters x : float A random variable index : int 0 or 1 depending on which latent variable Returns The gradient of the scale latent variable at x """

        if index == 0:
            return self.vi_loc_score(x)
        elif index == 1:
            return self.vi_scale_score(x)