code: def _java_api():
      """
      Loads the PythonInterface object (lazily, because the spark context needs to be initialized
      first).
      """
      global _sc, _sql
      javaClassName = "org.tensorframes.impl.DebugRowOps"
      if _sc is None:
          _sc = SparkContext._active_spark_context
          logger.info("Spark context = " + str(_sc))
          _sql = SQLContext(_sc)
      _jvm = _sc._jvm
      # You cannot simply call the creation of the the class on the _jvm due to classloader issues
      # with Py4J.
      return (
          _jvm.Thread.currentThread()
          .getContextClassLoader()
          .loadClass(javaClassName)
          .newInstance()
      )
  
imports: import tensorflow
  import numpy
  import logging
  import tempfile
  import pandas
  from pyspark import RDD, SparkContext
  from pyspark.sql import SQLContext, Row, DataFrame
  from pyspark.sql.types import DoubleType, IntegerType, LongType, FloatType, ArrayType
label_desc: Use image node_id 1 for calling a global function with example usage: _java_api() and returns: _jvm