code: def _generate_feed_dict(self, batch_data, input_map):
      feed_dict = dict()
  
      if type(batch_data) is np.ndarray:
          keys = batch_data.dtype.names
      elif type(batch_data) is dict:
          keys = batch_data.keys()
      else:
          assert False, "Invalid batch data format"
  
      for key in keys:
          feed_dict[input_map[key]] = batch_data[key]
      return feed_dict
  
imports: import tensorflow
  import numpy
  import os
label_desc: Use image node_id 2 for calling the Recommender obj's underlying member method code with example usage: obj._generate_feed_dict(batch_data, input_map) and returns: feed_dict