<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_matrix(self, x1, x2=None):
 """ Get the covariance matrix at a given set or two of independent coordinates. :param x1: ``(nsamples,)`` or ``(nsamples, ndim)`` A list of samples. :param x2: ``(nsamples,)`` or ``(nsamples, ndim)`` (optional) A second list of samples. If this is given, the cross covariance matrix is computed. Otherwise, the auto-covariance is evaluated. """

        x1 = self.parse_samples(x1)
        if x2 is None:
            return self.kernel.get_value(x1)
        x2 = self.parse_samples(x2)
        return self.kernel.get_value(x1, x2)