docs: def importPreflibFile(self, fileName):
          """
          Imports a preflib format file that contains all the information of a Profile. This function
          will completely override all members of the current Profile object. Currently, we assume 
          that in an election where incomplete ordering are allowed, if a voter ranks only one 
          candidate, then the voter did not prefer any candidates over another. This may lead to some
          discrepancies when importing and exporting a .toi preflib file or a .soi preflib file.
  
          :ivar str fileName: The name of the input file to be imported.
          """
  
          # Use the functionality found in io to read the file.
          elecFileObj = open(fileName, 'r')
          self.candMap, rankMaps, wmgMapsCounts, self.numVoters = prefpy_io.read_election_file(elecFileObj)
          elecFileObj.close()
  
          self.numCands = len(self.candMap.keys())
  
          # Go through the rankMaps and generate a wmgMap for each vote. Use the wmgMap to create a
          # Preference object.
          self.preferences = []
          for i in range(0, len(rankMaps)):
              wmgMap = self.genWmgMapFromRankMap(rankMaps[i])
              self.preferences.append(Preference(wmgMap, wmgMapsCounts[i]))