def get_catalog_options(self):
<EOL>if hasattr(self.instance, '<STR_LIT>'):<EOL><INDENT>catalog_api = CourseCatalogApiClient(self.user, self.instance.site)<EOL><DEDENT>else:<EOL><INDENT>catalog_api = CourseCatalogApiClient(self.user)<EOL><DEDENT>catalogs = catalog_api.get_all_catalogs()<EOL>catalogs = sorted(catalogs, key=lambda catalog: catalog.get('<STR_LIT:name>', '<STR_LIT>').lower())<EOL>return BLANK_CHOICE_DASH + [<EOL>(catalog['<STR_LIT:id>'], catalog['<STR_LIT:name>'],)<EOL>for catalog in catalogs<EOL>]<EOL>
Retrieve a list of catalog ID and name pairs.

Once retrieved, these name pairs can be used directly as a value
for the `choices` argument to a ChoiceField.