input: Write a function to create a simple chatbot using Python and state diagrams. The function should initialize the chatbot with predefined states and manage the conversation flow based on user inputs. If the user input matches a reply option, the chatbot should transition to the appropriate state. Otherwise, it should prompt the user to try again. The function should also keep a record of the conversation and print it at the end.
  
  assert create_chatbot()=="""Hello! How can I help you?
  >> I need some advice
  Sure, what kind of advice do you need?
  >> Career advice
  It is always a good idea to research the field you are interested in and creating a plan to learn the skills that are required. Make sure to contact professionals in the field to understand their experience.
  Goodbye!
  =========================
  Conversation:
  Hello! How can I help you?
  I need some advice
  Sure, what kind of advice do you need?
  Career advice
  It is always a good idea to research the field you are interested in and creating a plan to learn the skills that are required. Make sure to contact professionals in the field to understand their experience."""
output: def create_chatbot():
      states = {
          "start": {
              "message": "Hello! How can I help you?",
              "transitions": {
                  "I need some advice": "advice"
              }
          },
          "advice": {
              "message": "Sure, what kind of advice do you need?",
              "transitions": {
                  "Career advice": "career_advice"
              }
          },
          "career_advice": {
              "message": "It is always a good idea to research the field you are interested in and creating a plan to learn the skills that are required. Make sure to contact professionals in the field to understand their experience.",
              "transitions": {}
          }
      }
  
      current_state = "start"
      conversation = []
  
      while current_state != "end":
          conversation.append(states[current_state]["message"])
          if not states[current_state]["transitions"]:
              break
          user_input = input(">> ")
          conversation.append(user_input)
          if user_input in states[current_state]["transitions"]:
              current_state = states[current_state]["transitions"][user_input]
          else:
              conversation.append("Invalid input. Please try again.")
  
      conversation.append("Goodbye!")
      return "\n".join(conversation) + "\n=========================\nConversation:\n" + "\n".join(conversation)