<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _split_line(self, line_str):
 """Split line and check number of columns"""

        arr = line_str.rstrip().split("\t")
        if len(arr) != self.expected_fields:
            raise exceptions.InvalidRecordException(
                (
                    "The line contains an invalid number of fields. Was "
                    "{} but expected {}\n{}".format(len(arr), 9 + len(self.samples.names), line_str)
                )
            )
        return arr