code: def getCandScoresMapFromSamplesFile(self, profile, sampleFileName):
          
  
          wmg = profile.getWmg(True)
  
          # Initialize our list of expected utilities.
          utilities = dict()
          for cand in wmg.keys():
              utilities[cand] = 0.0
  
          # Open the file and skip the lines of meta data in the file and skip samples for burn-in.
          sampleFile = open(sampleFileName)
          for i in range(0, SAMPLESFILEMETADATALINECOUNT):
              sampleFile.readline()
          for i in range(0, self.burnIn):
              sampleFile.readline()
  
          # We update our utilities as we read the file.
          numSamples = 0
          for i in range(0, self.n2*self.n1):
              line = sampleFile.readline()
              if i % self.n1 != 0: continue
              sample = json.loads(line)
              for cand in wmg.keys():
                  utilities[cand] += self.utilityFunction.getUtility([cand], sample)
              numSamples += 1
          sampleFile.close()
          for key in utilities.keys():
              utilities[key] = utilities[key]/numSamples
  
          return utilities
docs: Returns a dictonary that associates the integer representation of each candidate with the 
          Bayesian utilities we approximate from the samples we generated into a file.
  
          :ivar Profile profile: A Profile object that represents an election profile.
          :ivar str sampleFileName: The name of the input file containing the sample data.