<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def logprob(self, action_sample, pd_params):
 """ Log-likelihood """

        means = pd_params[:, :, 0]
        log_std = pd_params[:, :, 1]

        std = torch.exp(log_std)

        z_score = (action_sample - means) / std

        return - (0.5 * ((z_score**2 + self.LOG2PI).sum(dim=-1)) + log_std.sum(dim=-1))