code: def load_data_and_model(items_as_dict, **context):
      
      res = {}
      for k, v in items_as_dict.items():
          if isinstance(v, str):
              if os.path.splitext(v)[-1] == ".pkl":
                  with open(v, "rb") as f:
                      try:
                          bin = pickle.load(f)
                      except ImportError as e:
                          if '.model.' in v:
                              continue
                          else:
                              raise ImportError("Unable to load '{0}' due to {1}".format(v, e))
                      res[k] = bin
              elif os.path.splitext(v)[-1] == ".keras":
                  import keras.models
                  res[k] = keras.models.load_model(v, custom_objects=context)
              else:
                  res[k] = v
          else:
              res[k] = v
      return res
docs: Loads every file in a dictionary {key: filename}.
      The extension is either *pkl* and *onnx* and determines
      how it it loaded. If the value is not a string,
      the function assumes it was already loaded.