def translateArabic(aLabel, usePrefix):

    # print " in translateArabic ... "

    pLen = len(usePrefix)
    bLabel = aLabel.upper()
    if (bLabel.startswith(usePrefix)):
        bLabel = bLabel[pLen:]
        if (bLabel[0] == "_"):
            bLabel = bLabel[1:]
        bLen = len(bLabel)
        found = 0
        for iLen in range(bLen, 0, -1):
            # print found, iLen, bLabel[:iLen]
            if (not found):
                try:
                    curN = int(bLabel[:iLen])
                    found = 1
                except:
                    doNothing = 1

        if (not found):
            # X means that it could not be assessed, so returning NA
            if (bLabel == "X"):
                return ("NA")
            # B means 'borderline' but returning NA ...
            elif (bLabel == "B"):
                return ("NA")
            else:
                print " ERROR ??? <%s> <%s>  --> returning NA " % (bLabel, usePrefix)
                return ("NA")

        rLen = len(str(curN))
        if (len(bLabel) > rLen):
            bLabel = bLabel[rLen:]
            if (bLabel == "A"):
                curN += 0.2
            elif (bLabel == "B"):
                curN += 0.4
            elif (bLabel == "C"):
                curN += 0.6
            else:
                print "     left over in translateArabic <%s> <%s> <%s> " % (bLabel, aLabel, usePrefix)

        return (curN)

    else:
        return ("NA")