input: Write a python function to add resources to an e-book and process images.
  assert len(res.records) == 3
  assert res.process_image(b'\x89PNG\r\n\x1a\n') == b'\x89PNG\r\n\x1a\n'
  assert res.item_map['image1.png'] == 1
output: def add_resources_to_ebook(res):
      res.records.append("Resource1")
      res.records.append("Resource2")
      res.records.append("Resource3")
  
      def process_image(image_data):
          # Assuming the processing of image is simply returning the image_data as is
          return image_data
  
      res.process_image = process_image
      res.item_map['image1.png'] = 1