def METHOD_NAME(db, fsfolder, collection_name, id):
  entry = db[collection_name + ".ref"].find_one({"_id": id})
  if entry:
    if entry["type"] == "fs":
      if removeFileFs(fsfolder, entry["link"]):
        print("File succesfully removed from filesystem" + entry["link"])
      else:
        print("File unsuccesfully removed from filesystem" + entry["link"])
    removeFileGridFs(db, collection_name, entry["link"])
  else:
    print ("Fileref not found " + id)
  db[collection_name + ".ref"].delete_one({"_id": id})