new_contents: import json
  import warnings
  import numpy as np
  from keras import backend as K
  from keras.utils.data_utils import get_file
  
  CLASS_INDEX = None
  CLASS_INDEX_PATH = 'https://github.com/GKalliatakis/Keras-VGG16-places365/blob/master/places365_class_index.json'
  
  
  def decode_predictions(preds, top=5):
      """Decodes the prediction of a Places model.
      # Arguments
          preds: Numpy tensor encoding a batch of predictions.
          top: integer, how many top-guesses to return.
      # Returns
          A list of lists of top class prediction tuples
          `(class_name, class_description, score)`.
          One list of tuples per sample in batch input.
      # Raises
          ValueError: in case of invalid shape of the `pred` array
              (must be 2D).
      """
      global CLASS_INDEX
      if len(preds.shape) != 2 or preds.shape[1] != 365:
          raise ValueError('`decode_predictions` expects '
                           'a batch of predictions '
                           '(i.e. a 2D array of shape (samples, 365)). '
                           'Found array with shape: ' + str(preds.shape))
      if CLASS_INDEX is None:
          fpath = get_file('places365_class_index.json',
                           CLASS_INDEX_PATH)
          CLASS_INDEX = json.load(open(fpath))
      results = []
      for pred in preds:
          top_indices = pred.argsort()[-top:][::-1]
          result = [tuple(CLASS_INDEX[str(i)]) + (pred[i],) for i in top_indices]
          result.sort(key=lambda x: x[2], reverse=True)
          results.append(result)
      return results
  
subject: Create places_utils.py