<s> from . base import * <EOL> class Countries ( ListableApiResource , CountableApiResource ) : <EOL> resource_name = '<STR_LIT>' <EOL> def states ( self , id = None ) : <EOL> if id : <EOL> return CountryStates . get ( self . id , id , connection = self . _connection ) <EOL> else : <EOL> return CountryStates . all ( self . id , connection = self . _connection ) <EOL> class CountryStates ( ListableApiSubResource , CountableApiSubResource ) : <EOL> resource_name = '<STR_LIT>' <EOL> parent_resource = '<STR_LIT>' <EOL> parent_key = '<STR_LIT>' </s>
