def get_program_types(user=None):
 catalog_integration = CatalogIntegration.current()
 if catalog_integration.enabled:
  user = _get_service_user(user, catalog_integration.service_username)
  if (not user):
   return []
  api = create_catalog_api_client(user, catalog_integration)
  cache_key = '{base}.program_types'.format(base=catalog_integration.CACHE_KEY)
  return get_edx_api_data(catalog_integration, user, 'program_types', cache_key=(cache_key if catalog_integration.is_cache_enabled else None), api=api)
 else:
  return []

def get_program_types ( user = None ) : catalog_integration = CatalogIntegration . current ( ) if catalog_integration . enabled : user = _get_service_user ( user , catalog_integration . service_username ) if ( not user ) : return [ ] api = create_catalog_api_client ( user , catalog_integration ) cache_key = '{base}.program_types' . format ( base = catalog_integration . CACHE_KEY ) return get_edx_api_data ( catalog_integration , user , 'program_types' , cache_key = ( cache_key if catalog_integration . is_cache_enabled else None ) , api = api ) else : return [ ]
retrieve all program types from the catalog service .