input: Write a function to implement a DFA that checks for a specific pattern in a string.
  assert implement_dfa('a')==False
  assert implement_dfa('ab')==False
  assert implement_dfa('aab')==True
  assert implement_dfa('aabb')==False
output: def implement_dfa(s: str) -> bool:
      state = 0
      for char in s:
          if state == 0:
              if char == 'a':
                  state = 1
              else:
                  return False
          elif state == 1:
              if char == 'a':
                  state = 2
              else:
                  return False
          elif state == 2:
              if char == 'b':
                  state = 3
              else:
                  return False
          elif state == 3:
              return False
  
      return state == 3