input: Write a python function to detect the intent of a given text using the Dialogflow API.
  assert detect_intent_texts('session_12345', 'Hello, how are you?') == 'Response from Dialogflow'
  assert detect_intent_texts('session_67890', 'What is the weather like today?') == 'Response from Dialogflow'
  assert detect_intent_texts('session_54321', 'Tell me a joke.') == 'Response from Dialogflow'
output: def detect_intent_texts(session_id, text):
      from google.cloud import dialogflow_v2 as dialogflow
      import os
      
      # Set up Dialogflow credentials
      os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "path_to_your_service_account.json"
      
      project_id = "your_project_id"
      session_client = dialogflow.SessionsClient()
      session = session_client.session_path(project_id, session_id)
      
      text_input = dialogflow.TextInput(text=text, language_code="en")
      query_input = dialogflow.QueryInput(text=text_input)
      
      response = session_client.detect_intent(request={"session": session, "query_input": query_input})
      
      return response.query_result.fulfillment_text