class_docstr: Storage adapter that allows ChatterBot to interact with
  Django storage backends.
class_docstr_tok: ["Storage","adapter","that","allows","ChatterBot","to","interact","with","Django","storage","backends","."]
docstr: Update the provided statement.
docstr_tok: ["Update","the","provided","statement","."]
code: def update(self, statement):
      """
      Update the provided statement.
      """
      Statement = self.get_model("statement")
      Tag = self.get_model("tag")
  
      if hasattr(statement, "id"):
          statement.save()
      else:
          statement = Statement.objects.create(
              text=statement.text,
              search_text=self.tagger.get_text_index_string(
                  statement.text
              ),
              conversation=statement.conversation,
              in_response_to=statement.in_response_to,
              search_in_response_to=self.tagger.get_text_index_string(
                  statement.in_response_to
              ),
              created_at=statement.created_at,
          )
  
      for _tag in statement.tags.all():
          tag, _ = Tag.objects.get_or_create(name=_tag)
  
          statement.tags.add(tag)
  
      return statement
  
file_path: ChatterBot/chatterbot/storage/django_storage.py
imports: from chatterbot.storage import StorageAdapter
  from chatterbot import constants
label_desc: Use image node_id 8 for calling the DjangoStorageAdapter obj's underlying member method code with example usage: obj.update(statement) and returns: statement