input: Write a function to create a simple chatbot using Python and state diagrams, which initializes at state0 and transitions between defined states based on user input until a terminal state is reached. The function should print the current state's message, get user input, and update the state accordingly. If the user input does not match any replies in the current state, the chatbot should inform the user that it does not understand. The function should also log the conversation and print it at the end.
  
  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.
  =========================
  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.'''
  
  assert create_chatbot("Hello", "Can you answer my questions?", "Why is coding so hard") == '''Hello! How can I help you?
  >> Hello
  I don't understand what you mean. Please try again.
  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!
  =========================
  Conversation:
  Hello! How can I help you?
  Hello
  I don't understand what you mean. Please try again.
  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.'''
  
  assert create_chatbot("Invalid input", "Can you answer my questions?", "Where can I find good tutorials") == '''Hello! How can I help you?
  >> Invalid input
  I don't understand what you mean. Please try again.
  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!
  =========================
  Conversation:
  Hello! How can I help you?
  Invalid input
  I don't understand what you mean. Please try again.
  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.'''
output: def create_chatbot(*user_inputs):
      states = {
          'state0': {
              'message': 'Hello! How can I help you?',
              'replies': {
                  'I need some advice': 'state1',
                  'Can you answer my questions?': 'state2',
                  'Hello': 'state0'
              }
          },
          'state1': {
              'message': 'Sure, what kind of advice do you need?',
              'replies': {
                  'Career advice': 'state3'
              }
          },
          'state2': {
              'message': 'Yes, I\'ll do my best! What do you want to know?',
              'replies': {
                  'Why is coding so hard': 'state4',
                  'Where can I find good tutorials': 'state5'
              }
          },
          'state3': {
              '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': {}
          },
          'state4': {
              'message': 'Coding can be challenging, especially at first. Just remember that with practice, patience and problem solving skills you can overcome the obstacles.',
              'replies': {}
          },
          'state5': {
              'message': 'You can find tutorials online or join coding communities to get help from experienced coders. StackOverflow and Cod Academy are great resources.',
              'replies': {}
          }
      }
  
      current_state = 'state0'
      conversation = []
  
      for user_input in user_inputs:
          conversation.append(f'>> {user_input}')
          if user_input in states[current_state]['replies']:
              new_state = states[current_state]['replies'][user_input]
              conversation.append(states[new_state]['message'])
              current_state = new_state
          else:
              conversation.append("I don't understand what you mean. Please try again.")
              conversation.append(states[current_state]['message'])
  
      conversation_log = '\n'.join(conversation)
      return f"{conversation_log}\n=========================\nConversation:\n{conversation_log}"