input: Write a python function to detect intent from text using Dialogflow.
  assert detect_intent_from_text('How do I fix my broken window?', 'en-US', 'test-project', 'test-session').intent.display_name is not None
  assert detect_intent_from_text('What is the weather today?', 'en-US', 'test-project', 'test-session').intent.display_name is not None
output: from google.cloud import dialogflow_v2 as dialogflow
  
  def detect_intent_from_text(text, language_code, project_id, session_id):
      session_client = dialogflow.SessionsClient()
      session = session_client.session_path(project_id, session_id)
      
      text_input = dialogflow.TextInput(text=text, language_code=language_code)
      query_input = dialogflow.QueryInput(text=text_input)
      
      response = session_client.detect_intent(request={"session": session, "query_input": query_input})
      
      return response.query_result