code: def match_us_state(state_string):
      
      if state_string:
          state_string = state_string.upper().replace('.', '').strip()
          if us_state_to_iso_code.get(state_string):
              return us_state_to_iso_code.get(state_string)
          else:
              for code, state_spellings in us_states_alternative_spellings.items():
                  for spelling in state_spellings:
                      if state_string == spelling:
                          return code
      return None
docs: Try to match a string with one of the states in the US.