def test_trust_remote_code_validation_false(self):
        """
        Test that an error is raised when trust_remote_code is set to True for model or tokenizer,
        but is not set in the model_properties or is set to false
        """
        for trust_remote_code in [None, False]:
            for model_trust_remote_code, tokenizer_trust_remote_code in [(True, False), (False, True), (True, True)]:
                with self.subTest(trust_remote_code=trust_remote_code,
                                  model_trust_remote_code=model_trust_remote_code,
                                  tokenizer_trust_remote_code=tokenizer_trust_remote_code):
                    model_properties = {k: v for k, v in {'name': 'my_model', 'type': 'hf', 'dimensions': 512,
                                                          'trustRemoteCode': trust_remote_code}.items() if
                                        v is not None}
                    device = 'cpu'

                    # Case 1: trust_remote_code flag not set in model_properties, should raise InvalidModelPropertiesError
                    model_flags = HuggingFaceModelFlags(trust_remote_code=model_trust_remote_code)
                    tokenizer_flags = HuggingFaceTokenizerFlags(trust_remote_code=tokenizer_trust_remote_code)

                    with self.assertRaises(InvalidModelPropertiesError) as context:
                        HuggingFaceModel(model_properties, device, model_flags=model_flags,
                                         tokenizer_flags=tokenizer_flags)

                    self.assertIn("trustRemoteCode", str(context.exception))

        for trust_remote_code in [None, False]:
            with self.subTest(trust_remote_code=trust_remote_code):
                model_properties = {k: v for k, v in {'name': 'my_model', 'type': 'hf', 'dimensions': 512,
                                                      'trustRemoteCode': trust_remote_code}.items() if
                                    v is not None}
                device = 'cpu'

                # Case 1: trust_remote_code flag not set in model_properties, should raise InvalidModelPropertiesError
                model_flags = HuggingFaceModelFlags(trust_remote_code=False)
                tokenizer_flags = HuggingFaceTokenizerFlags(trust_remote_code=False)

                self.assertIsNotNone(HuggingFaceModel(model_properties, device, model_flags=model_flags,
                                                      tokenizer_flags=tokenizer_flags))

        Test that an error is raised when trust_remote_code is set to True for model or tokenizer,
        but is not set in the model_properties or is set to false
        
tests/integ_tests/core/inference/embedding_models/test_hugging_face_model.py