def parse_cluster(data_dict):
    """Retrieve Cluster from PhagesDB.

    If the phage is clustered, 'pcluster' is a dictionary, and one key is
    the Cluster data (Cluster or 'Singleton').
    If for some reason no Cluster info is added at the time
    the genome is added to PhagesDB, 'pcluster' may automatically be
    set to NULL, which gets converted to "Unclustered" during retrieval.
    In the MySQL database NULL means Singleton, and the long form
    "Unclustered" is invalid due to its character length,
    so this value is converted to 'UNK' ('Unknown').

    :param data_dict: Dictionary of data retrieved from PhagesDB.
    :type data_dict: dict
    :returns: Cluster of the phage.
    :rtype: str
    """
    try:
        if data_dict['pcluster'] is None:
            cluster = 'UNK'
        else:
            cluster = data_dict['pcluster']['cluster']
    except:
        cluster = ''
    return cluster
