input: Write a function to create an AI-based chatbot in Python that answers simple queries about a product or service. The chatbot should respond with predefined answers if the query matches a question in the dictionary, and with a random chosen message if the query does not match any predefined answers.
  def generate_response(question, answers):
      if question in answers:
          return answers[question]
      else:
          return random.choice(['I am not sure I understand.', 'Can you give me more information?', 'Can I help you with something else?'])
  
  assert generate_response('What is XYZ?', {'What is XYZ?': 'XYZ is a company that provides XYZ services.'})=='XYZ is a company that provides XYZ services.'
  assert generate_response('Where is XYZ located?', {'What is XYZ?': 'XYZ is a company that provides XYZ services.'})=='I am not sure I understand.'
output: def generate_response(question, answers):
      if question in answers:
          return answers[question]
      else:
          return random.choice(['I am not sure I understand.', 'Can you give me more information?', 'Can I help you with something else?'])