def get_otp_modehex_interpretation(self, otp):
        try:
            interpretations = translate(u(otp))
        except Exception:
            return otp

        if len(interpretations) == 0:
            return otp
        elif len(interpretations) > 1:
            # If there are multiple interpretations first try to use the same
            # translation as the input OTP. If the one is not found, use the
            # random interpretation.
            if u(otp) in interpretations:
                return otp

        return interpretations.pop()
Return modhex interpretation of the provided OTP.
dataset/ETHPy150Open Kami/python-yubico-client/yubico_client/otp.py/OTP.get_otp_modehex_interpretation