code: def replace(self, photo_file, **kwds):
          
          result = self._client.photo.replace(self, photo_file, **kwds)
          self._replace_fields(result.get_fields())
docs: Endpoint: /photo/<id>/replace.json
  
          Uploads the specified photo file to replace this photo.