def _get_tags(ws_info):
    """Get the tags relevant to search from the ws_info metadata"""
    metadata = ws_info[-1]
    if metadata.get('searchtags'):
        if isinstance(metadata['searchtags'], list):
            return metadata['searchtags']
        else:
            return [metadata['searchtags']]
    else:
        return []