code: def _map(
      fetches,
      dframe,
      feed_dict,
      block,
      trim,
      initial_variables=_initial_variables_default,
  ):
      fetches = _check_fetches(fetches)
      # We are not dealing for now with registered expansions, but this is something we should add later.
      graph = _get_graph(fetches, initial_variables)
      if block:
          builder = _java_api().map_blocks(dframe._jdf, trim)
      else:
          builder = _java_api().map_rows(dframe._jdf)
      _add_graph(graph, builder)
      ph_names = _add_shapes(graph, builder, fetches)
      _add_inputs(builder, feed_dict, ph_names)
      jdf = builder.buildDF()
      return DataFrame(jdf, _sql)
  
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 10 for calling a global function with example usage: _map(fetches, dframe, feed_dict, block, trim, initial_variables) and returns: DataFrame