code: def validate(self):
      if not isinstance(self.resource_type, ResourceType):
          raise IllegalArgumentError(
              "resource_type must be a ResourceType object"
          )
      if not isinstance(self.pattern_type, ACLResourcePatternType):
          raise IllegalArgumentError(
              "pattern_type must be an ACLResourcePatternType object"
          )
  
imports: from __future__ import absolute_import
  from kafka.errors import IllegalArgumentError
label_desc: Use image node_id 2 for calling the ResourcePatternFilter obj's underlying member method code with example usage: obj.validate() without return types