def _check_fp16_weight_params_lstms(self, lstm_wp, has_peephole=True):
        """
        Checks if an LSTM layer has at least one ``weight_param`` which is in FP16 format.

        Parameters
        ----------
        lstm_wp: LSTM weights.
        has_peephole: if the LSTM has a peephole.
        """
        if len(lstm_wp.inputGateWeightMatrix.float16Value) > 0:
            return True
        if len(lstm_wp.forgetGateWeightMatrix.float16Value) > 0:
            return True
        if len(lstm_wp.blockInputWeightMatrix.float16Value) > 0:
            return True
        if len(lstm_wp.outputGateWeightMatrix.float16Value) > 0:
            return True
        if len(lstm_wp.inputGateRecursionMatrix.float16Value) > 0:
            return True
        if len(lstm_wp.forgetGateRecursionMatrix.float16Value) > 0:
            return True
        if len(lstm_wp.blockInputRecursionMatrix.float16Value) > 0:
            return True
        if len(lstm_wp.outputGateRecursionMatrix.float16Value) > 0:
            return True
        if len(lstm_wp.inputGateWeightMatrix.float16Value) > 0:
            return True

        if has_peephole:
            if len(lstm_wp.inputGatePeepholeVector.float16Value) > 0:
                return True
            if len(lstm_wp.forgetGatePeepholeVector.float16Value) > 0:
                return True
            if len(lstm_wp.outputGatePeepholeVector.float16Value) > 0:
                return True

        return False

        Checks if an LSTM layer has at least one ``weight_param`` which is in FP16 format.

        Parameters
        ----------
        lstm_wp: LSTM weights.
        has_peephole: if the LSTM has a peephole.
        
coremltools/models/neural_network/builder.py