def htrc_get_titles(metadata, vol_id):
    """
    Gets titles of the volume given the metadata from a json file
    and volume id.
    """
    try:
        md = metadata[vol_id]
        return md[list(md.keys())[0]]['titles']
    except KeyError:
        print('Volume ID not found:', vol_id)
        raise
