def _get_catalogs(service_type, catalog_db, **kwargs):
 if (catalog_db is None):
  catalog_db = get_remote_catalog_db(service_type, **kwargs)
  catalogs = catalog_db.get_catalogs()
 elif isinstance(catalog_db, VOSDatabase):
  catalogs = catalog_db.get_catalogs()
 elif isinstance(catalog_db, (VOSCatalog, six.string_types)):
  catalogs = [(None, catalog_db)]
 elif isinstance(catalog_db, list):
  for x in catalog_db:
   assert (isinstance(x, (VOSCatalog, six.string_types)) and (not isinstance(x, VOSDatabase)))
  catalogs = [(None, x) for x in catalog_db]
 else:
  raise VOSError(u'catalog_db must be a catalog database, a list of catalogs, or a catalog')
 return catalogs

def _get_catalogs ( service_type , catalog_db , ** kwargs ) : if ( catalog_db is None ) : catalog_db = get_remote_catalog_db ( service_type , ** kwargs ) catalogs = catalog_db . get_catalogs ( ) elif isinstance ( catalog_db , VOSDatabase ) : catalogs = catalog_db . get_catalogs ( ) elif isinstance ( catalog_db , ( VOSCatalog , six . string_types ) ) : catalogs = [ ( None , catalog_db ) ] elif isinstance ( catalog_db , list ) : for x in catalog_db : assert ( isinstance ( x , ( VOSCatalog , six . string_types ) ) and ( not isinstance ( x , VOSDatabase ) ) ) catalogs = [ ( None , x ) for x in catalog_db ] else : raise VOSError ( u'catalog_db must be a catalog database, a list of catalogs, or a catalog' ) return catalogs
expand catalog_db to a list of catalogs .