docs: def readmetadata():
  	"""Read/create cached metadata dump of Gutenberg catalog.
  	Returns:
  		A dictionary with the following fields:
  		id (int): Gutenberg identifier of text
  		author (str): Last name, First name
  		title (str): title of work
  		subjects (list of str): list of descriptive subjects; a subject may be
  			hierarchical, e.g:
  			'England -- Social life and customs -- 19th century -- Fiction'
  		LCC (list of str): a list of two letter Library of Congress
  			Classifications, e.g., 'PS'
  		language (list of str): list of two letter language codes.
  		type (str): 'Text', 'Sound', ...
  		formats (dict of str, str pairs): keys are MIME types, values are URLs.
  		download count (int): the number of times this ebook has been
  			downloaded from the Gutenberg site in the last 30 days.
  	Fields that are not part of the metadata are set to None.
  	http://www.gutenberg.org/wiki/Gutenberg:Help_on_Bibliographic_Record_Page
  	"""
  	if os.path.exists(PICKLEFILE):
  		metadata = pickle.load(gzip.open(PICKLEFILE, 'rb'))
  	else:
  		metadata = {}
  		for xml in tqdm(getrdfdata()):
  			ebook = xml.find(r'{%(pg)s}ebook' % NS)
  			if ebook is None:
  				continue
  			result = parsemetadata(ebook)
  			if result is not None:
  				metadata[result['id']] = result
  		pickle.dump(metadata, gzip.open(PICKLEFILE, 'wb'), protocol=-1)
  	return metadata