input: Write a function to create a simple chatbot using Python and Dialogflow, which can answer questions about the current days of the week. The chatbot should be able to detect the intent of the user's text and respond accordingly. If the session_id is not present, it should create one.
  
  def create_chatbot():
      from flask import Flask
      from flask_restful import Resource, Api
      from dialogflow import detect_intent_texts
  
      app = Flask(__name__)
      api = Api(app)
  
      @app.route('/', methods=['GET', 'POST'])
      def detect_intent_text():
          IF session_id NOT present
              PLEASE create session_id
          request = detect_intent_texts(session_id, text)
          response = request.fulfillment_text
          return response
  
      if __name__ == '__main__':
          app.run()
  
  assert create_chatbot().app.test_client().get('/', data={'text': 'What day is it today?', 'session_id': '12345'}).status_code==200
  assert create_chatbot().app.test_client().get('/', data={'text': 'What day is it tomorrow?', 'session_id': '12345'}).status_code==200
  assert create_chatbot().app.test_client().get('/', data={'text': 'Could you tell me today\'s date?', 'session_id': '12345'}).status_code==200
  assert create_chatbot().app.test_client().get('/', data={'text': 'What is the date tomorrow?', 'session_id': '12345'}).status_code==200
  assert create_chatbot().app.test_client().get('/', data={'text': ''}).status_code==200
output: 
  def detect_intent_text():
      from flask import request
      from dialogflow import detect_intent_texts
      import uuid
  
      session_id = request.args.get('session_id')
      text = request.args.get('text')
  
      if not session_id:
          session_id = str(uuid.uuid4())
  
      request_data = detect_intent_texts(session_id, text)
      response = request_data.fulfillment_text
      return response
  