def METHOD_NAME(self, line):
    try:
        key, value = list(map(str.strip, line.split('\t')))
    except ValueError:
        raise ValueError('Found invalid line: %s' % line)
    if not key:
        raise ValueError('The key is mandatory and should not be empty')
    try:
        value = int(value)
    except (TypeError, ValueError):
        pass
    return key, value