code: def test_validate_should_not_allow_both_type_and_allow_empty_in_a_spec(
      self,
  ):
      specification = [
          dict(
              name="labels",
              optional=True,
              type="dict",
              allow_empty=True,
          )
      ]
      body = {"labels": 1}
  
      validator = GcpBodyFieldValidator(specification, "v1")
  
      with pytest.raises(GcpValidationSpecificationException):
          validator.validate(body)
  
imports: from __future__ import annotations
  import pytest
  from airflow.providers.google.cloud.utils.field_validator import GcpBodyFieldValidator, GcpFieldValidationException, GcpValidationSpecificationException
label_desc: Use image node_id 17 for calling the TestGcpBodyFieldValidator obj's underlying member method code with example usage: obj.test_validate_should_not_allow_both_type_and_allow_empty_in_a_spec() without return types