code: def map_rows(
      fetches,
      dframe,
      feed_dict=None,
      initial_variables=_initial_variables_default,
  ):
      """Transforms a DataFrame into another DataFrame row by row, by adding new fields for each fetch.
  
      The `fetches` argument may be a list of graph elements or a single
      graph element. A graph element can be one of the following type:
  
      * a TensorFlow's Tensor object. The shape and the dtype of the tensor will dictate the structure of the column
  
      Note on computations: unlike the TensorFlow execution engine, the result is lazy and will not be computed until
      requested. However, all the fetches and the computation graph are frozen when this function is called.
  
      The inputs of the fetches must all be constants or placeholders. The placeholders must have the name of existing
      fields in the dataframe, and they must have the same dtype as the placeholder (no implicit casting is performed on
      the input). Additionally, they must have a tensor shape that is compatible with the shape of the elements in that
      field. For example, if the field contains scalar, only scalar shapes are accepted, etc.
  
      The names of the fetches must be all different from the names of existing columns, otherwise an error is returned.
  
      This method works row by row. If you want a more efficient method that can work on batches of rows, consider using
      [map_blocks] instead.
  
      Args:
        fetches: A single graph element, or a list of graph elements
          (described above).
        dframe: A Spark DataFrame object or a pandas DataFrame(for debug purpose).
          The columns of the tensor frame will be fed into the fetches at execution.
        feed_dict: a dictionary of string -> string. The key is the name of a placeholder in the current TensorFlow graph
                   of computation. The value is the name of a column in the dataframe. For now, only the top-level fields
                   in a dataframe are supported. For any placeholder that is not specified in the feed dictionary, the
                   name of the input column is assumed to be the same as that of the placeholder.
        initial_variables: a boolean option default True, initial variables if it is used.
  
      Returns: a DataFrame. The columns and their names are inferred from the names of the fetches.
  
      :param fetches: see description above
      :param dframe: a Spark DataFrame or a pandas DataFrame
      :param initial_variables: a boolean option default True, initial variables if it is used.
      :return: a Spark DataFrame or a pandas DataFrame
      """
      if isinstance(dframe, pd.DataFrame):
          return _map_pd(
              fetches,
              dframe,
              feed_dict,
              block=False,
              trim=None,
              initial_variables=initial_variables,
          )
      return _map(
          fetches,
          dframe,
          feed_dict,
          block=False,
          trim=None,
          initial_variables=initial_variables,
      )
  
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 15 for calling a global function with example usage: map_rows(fetches, dframe, feed_dict, initial_variables) and returns: _map, _map_pd