code: def call(
      f: Union[str, UserDefinedFunctionWrapper], *args
  ) -> Expression:
      """
      The first parameter `f` could be a str or a Python user-defined function.
  
      When it is str, this is a call to a function that will be looked up in a catalog. There
      are two kinds of functions:
  
          - System functions - which are identified with one part names
          - Catalog functions - which are identified always with three parts names
              (catalog, database, function)
  
      Moreover each function can either be a temporary function or permanent one
      (which is stored in an external catalog).
  
      Based on that two properties the resolution order for looking up a function based on
      the provided `function_name` is following:
  
          - Temporary system function
          - System function
          - Temporary catalog function
          - Catalog function
  
      :param f: the path of the function or the Python user-defined function.
      :param args: parameters of the user-defined function.
      """
      gateway = get_gateway()
  
      if isinstance(f, str):
          return Expression(
              gateway.jvm.Expressions.call(
                  f,
                  to_jarray(
                      gateway.jvm.Object,
                      [_get_java_expression(arg) for arg in args],
                  ),
              )
          )
  
      expressions_clz = load_java_class(
          "org.apache.flink.table.api.Expressions"
      )
      function_definition_clz = load_java_class(
          "org.apache.flink.table.functions.FunctionDefinition"
      )
      j_object_array_type = to_jarray(gateway.jvm.Object, []).getClass()
  
      api_call_method = expressions_clz.getDeclaredMethod(
          "apiCall",
          to_jarray(
              gateway.jvm.Class,
              [function_definition_clz, j_object_array_type],
          ),
      )
      api_call_method.setAccessible(True)
  
      return Expression(
          api_call_method.invoke(
              None,
              to_jarray(
                  gateway.jvm.Object,
                  [
                      f._java_user_defined_function(),
                      to_jarray(
                          gateway.jvm.Object,
                          [_get_java_expression(arg) for arg in args],
                      ),
                  ],
              ),
          )
      )
  
imports: from typing import Union
  from pyflink import add_version_doc
  from pyflink.java_gateway import get_gateway
  from pyflink.table.expression import Expression, _get_java_expression, TimePointUnit, JsonOnNull
  from pyflink.table.types import _to_java_data_type, DataType
  from pyflink.table.udf import UserDefinedFunctionWrapper
  from pyflink.util.java_utils import to_jarray, load_java_class
label_desc: Use image node_id 57 for calling a global function with example usage: call(f) and returns: Expression, Expression