docs: def parse_formula(fml_file):
      """
          Parse and return MaxSAT formula.
      """
  
      if re.search('\.wcnf(\.(gz|bz2|lzma|xz))?$', fml_file):
          fml = WCNF(from_file=fml_file)
      else:  # expecting '*.cnf'
          fml = CNF(from_file=fml_file).weighted()
  
      return fml