code: def Majority(k, n):
      
      examples = []
      for i in range(n):
          bits = [random.choice([0, 1]) for i in range(k)]
          bits.append(int(sum(bits) > k/2))
          examples.append(bits)
      return DataSet(name="majority", examples=examples)
docs: Return a DataSet with n k-bit examples of the majority problem:
      k random bits followed by a 1 if more than half the bits are 1, else 0.