<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, actions, action_logits):
 """ Logarithm of probability of given sample """

        neg_log_prob = F.nll_loss(action_logits, actions, reduction='none')
        return -neg_log_prob