<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def loglik(self, theta, t=None):
 """ log-likelihood at given parameter values. Parameters theta: dict-like theta['par'] is a ndarray containing the N values for parameter par t: int time (if set to None, the full log-likelihood is returned) Returns ------- l: float numpy.ndarray the N log-likelihood values """

        if t is None:
            t = self.T - 1
        l = np.zeros(shape=theta.shape[0])
        for s in range(t + 1):
            l += self.logpyt(theta, s)
        return l