<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_same_length(self, trajs_tuple):
 """Check that the datasets are the same length"""

        lens = [len(trajs) for trajs in trajs_tuple]
        if len(set(lens)) > 1:
            err = "Each dataset must be the same length. You gave: {}"
            err = err.format(lens)
            raise ValueError(err)