code: def read_mix2pl_dataset(infile, numVotes=None):
      
      m, n = [int(i) for i in infile.readline().split(',')]
      if numVotes is not None and n < numVotes:
          raise ValueError("invalid number of votes to read: exceeds file amount")
      params = np.array([float(f) for f in infile.readline().split(',')])
      if len(params) != (2*m + 1):
          infile.close()
          raise ValueError("malformed file: len(params) != 2*m + 1")
      votes = []
      i = 0
      for line in infile:
          if i > (numVotes - 1):
              break
          vote = [int(v) for v in line.split(',')]
          if len(vote) != m:
              infile.close()
              raise ValueError("malformed file: len(vote) != m")
          votes.append(vote)
          i += 1
      infile.close()
      return (params, np.array(votes))
docs: Description:
          Read from disk a Mixture of 2 Plackett-Luce models dataset.
      Parameters:
          infile:   open file object from which to read the dataset
          numVotes: number of votes to read from the file or all if None