'Generates a stats string with the given player stats according to the configuration.
:return: A string containing human-readable stats, ready to be displayed.
:rtype: string'

def _get_stats_line(self):

    available_stats = {'period': 'Period:    {}'.format(datetime.utcfromtimestamp(HashServer.status.get('period', 0))), 'remaining': 'Remaining:    {}'.format(HashServer.status.get('remaining', 0)), 'maximum': 'Maximum:    {}'.format(HashServer.status.get('maximum', 0)), 'expiration': 'Expiration:    {}'.format(datetime.utcfromtimestamp(HashServer.status.get('expiration', 0)))}
    def get_stat(stat):
        "\n                                                Fetches    a    stat    string    from    the    available    stats    dictionary.\n                                                :param    stat:    The    stat    name.\n                                                :type    stat:    string\n                                                :return:    The    generated    stat    string.\n                                                :rtype:    string\n                                                :raise:    ConfigException:    When    the    provided    stat    string    isn't    in    the    available    stats\n                                                dictionary.\n                                                "
        if (stat not in available_stats):
            raise ConfigException("Stat    '{}'    isn't    available    for    displaying".format(stat))
        return available_stats[stat]
    line = '    |    '.join(map(get_stat, self.displayed_stats))
    return line
