code: def learn_response(self, statement, previous_statement=None):
          
          if not previous_statement:
              previous_statement = statement.in_response_to
  
          if not previous_statement:
              previous_statement = self.get_latest_response(statement.conversation)
              if previous_statement:
                  previous_statement = previous_statement.text
  
          previous_statement_text = previous_statement
  
          if not isinstance(previous_statement, (str, type(None), )):
              statement.in_response_to = previous_statement.text
          elif isinstance(previous_statement, str):
              statement.in_response_to = previous_statement
  
          self.logger.info('Adding "{}" as a response to "{}"'.format(
              statement.text,
              previous_statement_text
          ))
  
          # Save the input statement
          return self.storage.create(**statement.serialize())
docs: Learn that the statement provided is a valid response.