input: Write a function to implement a simple chatbot using Python and Dialogflow, which can answer questions about the current days of the week. The chatbot should handle requests via a Flask API. If a session_id is not provided, the function should create one. The function should return the fulfillment text from the Dialogflow response.
  
  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 in request.args:
          session_id = create_session_id()
      else:
          session_id = request.args['session_id']
      text = request.args['text']
      request = detect_intent_texts(session_id, text)
      response = request.fulfillment_text
      return response
  
  
  def create_session_id():
      # Logic to create a new session ID
      return "new_session_id"
  
  
  if __name__ == '__main__':
      app.run()
  
  assert detect_intent_text(session_id="12345", text="What day is it today?") is not None
  assert detect_intent_text(text="What is the day after tomorrow?") is not None
output: def detect_intent_text():
      if 'session_id' not in request.args:
          session_id = create_session_id()
      else:
          session_id = request.args['session_id']
      text = request.args['text']
      request = detect_intent_texts(session_id, text)
      response = request.fulfillment_text
      return response