'Calculate the check digit for ISBN-10.
See https://en.wikipedia.org/wiki/International_Standard_Book_Number
for calculation.'

def _check_digit(self):

    weights = range(1, 10)
    body = ''.join([self.group, self.registrant, self.publication])
    remainder = (sum(((int(b) * w) for (b, w) in zip(body, weights))) % 11)
    check_digit = ('X' if (remainder == 10) else str(remainder))
    return str(check_digit)
