code: def load_states():
      
  
      from pkg_resources import resource_stream
  
      # load state data from pickle file
      with resource_stream(__name__, 'states.pkl') as pklfile:
          for s in pickle.load(pklfile):
  
              state = State(**s)  # create state object
  
              # create separate lists for obsolete, states, and territories
              if state.is_obsolete:
                  OBSOLETE.append(state)
              elif state.is_territory:
                  TERRITORIES.append(state)
              else:
                  STATES.append(state)
  
                  if state.is_contiguous:
                      STATES_CONTIGUOUS.append(state)
                  if state.is_continental:
                      STATES_CONTINENTAL.append(state)
  
              # also create list of all states and territories
              STATES_AND_TERRITORIES.append(state)
  
              # provide package-level abbreviation access: us.states.MD
              globals()[state.abbr] = state
docs: Load state data from pickle file distributed with this package.
  
          Creates lists of states, territories, and combined states and
          territories. Also adds state abbreviation attribute access
          to the package: us.states.MD