input: Write a function to implement a virtual assistant using Python and Dialogflow to answer a basic set of questions. The function should continuously take user input, pass it to Dialogflow for processing, and print the response from the assistant. If no input is given, the function should exit. Ensure the function handles session management and query detection appropriately.
  assert virtual_assistant('project-id', 'session-id', 'User: What is the weather today?')=='Assistant: The weather today is sunny.'
  assert virtual_assistant('project-id', 'session-id', 'User: How are you?')=='Assistant: I am doing great, thank you!'
  assert virtual_assistant('project-id', 'session-id', 'User: What time is it?')=='Assistant: The current time is 3:00 PM.'
  assert virtual_assistant('project-id', 'session-id', '')==None
output: def virtual_assistant(project_id, session_id, user_input):
      if not user_input:
          return None
      
      import dialogflow_v2 as dialogflow
      session_client = dialogflow.SessionsClient()
      session = session_client.session_path(project_id, session_id)
      
      text_input = dialogflow.types.TextInput(text=user_input, language_code='en')
      query_input = dialogflow.types.QueryInput(text=text_input)
      
      response = session_client.detect_intent(session=session, query_input=query_input)
      
      return f"Assistant: {response.query_result.fulfillment_text}"