code: def is_instance_of(java_object, java_class):
      gateway = get_gateway()
      if isinstance(java_class, str):
          param = java_class
      elif isinstance(java_class, JavaClass):
          param = get_java_class(java_class)
      elif isinstance(java_class, JavaObject):
          if not is_instance_of(java_class, gateway.jvm.Class):
              param = java_class.getClass()
          else:
              param = java_class
      else:
          raise TypeError(
              "java_class must be a string, a JavaClass, or a JavaObject"
          )
  
      return gateway.jvm.org.apache.flink.api.python.shaded.py4j.reflection.TypeUtil.isInstanceOf(
          param, java_object
      )
  
file_path: flink/flink-python/pyflink/util/java_utils.py
imports: from datetime import timedelta
  from py4j.java_gateway import JavaClass, get_java_class, JavaObject
  from py4j.protocol import Py4JJavaError
  from pyflink.java_gateway import get_gateway
label_desc: Use image node_id 5 for calling a global function with example usage: is_instance_of(java_object, java_class) and returns: gateway