<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def getOccurrenceOfCharAtIndex(self, sym, index):
        '''
        This functions gets the FM-index value of a character at the specified position
        @param sym - the character to find the occurrence level
        @param index - the index we want to find the occurrence level at
        @return - the number of occurrences of char before the specified index
        '''
        #sampling method
        #get the bin we occupy
        binID = index >> self.bitPower
        
        #these two methods seem to have the same approximate run time
        if (binID << self.bitPower) == index:
            ret = self.partialFM[binID][sym]
        else:
            ret = self.partialFM[binID][sym] + np.bincount(self.bwt[binID << self.bitPower:index], minlength=6)[sym]
        return int(ret)