code: def get_field(cls, field_name):
      try:
          field = cls.getDeclaredField(field_name)
          field.setAccessible(True)
          return field
      except Py4JJavaError:
          while cls.getSuperclass() is not None:
              cls = cls.getSuperclass()
              try:
                  field = cls.getDeclaredField(field_name)
                  field.setAccessible(True)
                  return field
              except Py4JJavaError:
                  pass
  
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 8 for calling a global function with example usage: get_field(cls, field_name) and returns: field, field