code: def generate_contrast(problem):
      
  
      num_vars = problem['num_vars']
  
      # Find the smallest n, such that num_vars < k
      k = [2 ** n for n in range(16)]
      k_chosen = 2 ** find_smallest(num_vars)
  
      # Generate the fractional factorial contrast
      contrast = np.vstack([hadamard(k_chosen), -hadamard(k_chosen)])
  
      return contrast
docs: Generates the raw sample from the problem file
  
      Arguments
      =========
      problem : dict
          The problem definition