<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dot(self, other, dims=None):
 """Perform dot product of two DataArrays along their shared dims. Equivalent to taking taking tensordot over all shared dims. Parameters other : DataArray The other array with which the dot product is performed. dims: list of strings, optional Along which dimensions to be summed over. Default all the common dimensions are summed over. Returns ------- result : DataArray Array resulting from the dot product over all shared dimensions. See also -------- dot numpy.tensordot Examples -------- ('z') ('x', 'y', 'z') ('x', 'y') """

        if isinstance(other, Dataset):
            raise NotImplementedError('dot products are not yet supported '
                                      'with Dataset objects.')
        if not isinstance(other, DataArray):
            raise TypeError('dot only operates on DataArrays.')

        return computation.dot(self, other, dims=dims)