input: Write a function to create a simple chatbot using Python and state diagrams, with predefined states and replies. If the user input matches a reply in the current state, the chatbot transitions to the corresponding state. If the input does not match any reply, the chatbot asks the user to try again. If the state has no replies, it signifies the end of the conversation.
  
  assert create_chatbot([]) == "Goodbye!"
  assert create_chatbot(["I need some advice", "Career advice"]) == ["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!"]
  assert create_chatbot(["Can you answer my questions?", "Where can I find good tutorials"]) == ["Hello! How can I help you?", "Can you answer my questions?", "Yes, I'll do my best! What do you want to know?", "Where can I find good tutorials", "You can find tutorials online or join coding communities to get help from experienced coders. StackOverflow and Cod Academy are great resources.", "Goodbye!"]
  assert create_chatbot(["I need some advice", "Health advice"]) == ["Hello! How can I help you?", "I need some advice", "Sure, what kind of advice do you need?", "Health advice", "Focus on eating healthy and staying active. Make sure to consult a medical professional if you have any concerns.", "Goodbye!"]
  assert create_chatbot(["Can you answer my questions?", "Why is coding so hard"]) == ["Hello! How can I help you?", "Can you answer my questions?", "Yes, I'll do my best! What do you want to know?", "Why is coding so hard", "Coding can be challenging, especially at first. Just remember that with practice, patience and problem solving skills you can overcome the obstacles.", "Goodbye!"]
output: def create_chatbot(user_inputs):
      states = {
          "start": {
              "message": "Hello! How can I help you?",
              "replies": {
                  "I need some advice": "advice",
                  "Can you answer my questions?": "questions"
              }
          },
          "advice": {
              "message": "Sure, what kind of advice do you need?",
              "replies": {
                  "Career advice": "career_advice",
                  "Health advice": "health_advice"
              }
          },
          "questions": {
              "message": "Yes, I'll do my best! What do you want to know?",
              "replies": {
                  "Where can I find good tutorials": "tutorials",
                  "Why is coding so hard": "coding_hard"
              }
          },
          "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.",
              "replies": {}
          },
          "health_advice": {
              "message": "Focus on eating healthy and staying active. Make sure to consult a medical professional if you have any concerns.",
              "replies": {}
          },
          "tutorials": {
              "message": "You can find tutorials online or join coding communities to get help from experienced coders. StackOverflow and Cod Academy are great resources.",
              "replies": {}
          },
          "coding_hard": {
              "message": "Coding can be challenging, especially at first. Just remember that with practice, patience and problem solving skills you can overcome the obstacles.",
              "replies": {}
          }
      }
  
      current_state = "start"
      conversation = []
  
      for user_input in user_inputs:
          conversation.append(states[current_state]["message"])
          if user_input in states[current_state]["replies"]:
              current_state = states[current_state]["replies"][user_input]
          else:
              conversation.append("Try again.")
              break
  
      conversation.append("Goodbye!")
      return conversation